youngmon/atlassian-qna huggingface dataset:
trying to set the repository generate by api as private is_private : true with no success
Asked by Eyal David:

Hi Guys

trying to set the repository generate by api as private

**is_private : true** with no success ... im using OAUTH ....

tried to create repo and update (post and put) with no success

with POST  
curl --request POST \\  
--url '<https://api.bitbucket.org/2.0/repositories/${mycompanyworkspace}/>${repo}' \\  
--header 'Authorization: Bearer ${token}' \\  
--header 'Accept: application/json' \\  
--data '{ "scm": "git", "is_private": "true" }'

with PUT  
curl --request PUT \\  
--url '<https://api.bitbucket.org/2.0/repositories/${mycompanyworkspace}/>${repo}' \\  
--header 'Authorization: Bearer ${token}' \\  
--header 'Accept: application/json' \\  
--data '{ "scm": "git", "is_private": "true" }'

I see that there is already question on this with no answer ...

<https://community.atlassian.com/t5/Bitbucket-questions/How-to-create-private-repository-via-API-2-0/qaq-p/1202924>

Thanks Eyal


Answers:
author: Norbert C
body: Hi [@Eyal David](/t5/user/viewprofilepage/user-id/4676376) ,

It's Norbert here from the other Community question :)

I would like to inform you the reason why the repository creation is failing is because the "-H "Content-Type: application/json" flag is missing from your call. This flag is needed as we need to specify the content type.

Can I ask you to do an API call like this and let me know if it creates you a private repository?

```
curl -X POST -H "Authorization: Bearer token" https://api.bitbucket.org/2.0/repositories/workspace/reposlug -H "Content-Type: application/json" -d '{"scm": "git", "is_private": true, "fork_policy": "no_public_forks"}'
```

Please let me know how it goes, Eyal.

Best Regards,  
Norbert  
Atlassian Bitbucket Cloud Support

comments: author: Eyal David
body: [@Norbert C](/t5/user/viewprofilepage/user-id/1190200) Thank you very much worked like a charm !!!


author: Norbert C
body: You're welcome, I'm glad to hear I was able to help :)


Tags: bitbucket-cloud

cloud
Migrating Bundled ElasticSearch
Asked by Moshe A:

Running BitBucket Server - Not Data Center.

1. Because the bundled ElasticSearch will not be updated to address Log4j, are there any instructions how to switch from the Bundled version to a standalone install?

2. Can the ElasticSearch install be installed on the same server as there is no mirroring/cluster in BitBucket Server?

3. How can we disable the bundled ElasticSearch after the migration?

Thanks in advance for any guidance.


Answers:
author: Gonchik Tsymzhitov
body: [@Moshe A](/t5/user/viewprofilepage/user-id/731180) Hi!

1. Please, take a look that ticket about log4j

<https://jira.atlassian.com/browse/BSERV-13093>

1.1. Regarding bundled version, as I see for the server release is impossible.

But what if you make a backup of indexes and schemas and evaluate local haproxy which will point to the external one?

2. I think you can make trick based on the haproxy

3. how about pointing on another port?

Cheers,

Gonchik

comments: author: Moshe A
body: ElasticSearch is not mentioned in the bug fix. It is mentioned in the security notice, but no guidance is provided for us server users. An unofficial hack isn't what I'm expecting, but an official response from Atlassian.


Tags: bitbucket-server

elastic-search

server
In SourceTree log view, I've lost the ability to view all changes as a list
Asked by KristopherR:

I'm using version 2.0.1, and when I used to click on a commit, I would see a list of changes by file name. Now its a visual representation of the changes by file name, which is hard to see all the files that changed easily. Did I mistakenly hide this view or is this a bug?


Answers:
author: KristopherR
body: This is what I mean (bottom middle left, underneath sorted by path). This is what's missing

<http://www.sourcetreeapp.com/images/sourcetree-hero-mac-log@2x.png>
Upgrade to SourceTree 2.0.1 made bookmark window too wide
Asked by Jane Eisenstein:

After upgrading to SourceTree 2.0.1 for Mac OS, the bookmarks window is very wide (even with compact view selected). It covers over a third of my screen. Even though there is lots of white space, I cannot narrow the window. Also, the icons in front of the repository names now look like waste paper baskets.


Answers:
author: Jane Eisenstein
body: Hey Atlassian, why don't you enable wrapping for the widgets the top of the bookmarks window? That would allow us to use this window without blocking out so much screen (a 15" MacBook Pro in my case) real estate .


author: Seth
body: Those icons are supposed to be buckets, and are the default repository icon in bitbucket.
Is it possible to disable the automatic version check at startup in SourceTree
Asked by Christoph Burger-Scheidlin:

SourceTree prompts me whenever an update is available. I presume this information is queried on startup of the program.

Is it possible to disable this automatic check (the connection to the internet, to be more precise) somehow?


Answers:
author: Christoph Burger-Scheidlin
body: Indeed, there is <https://jira.atlassian.com/browse/SRCTREEWIN-2084>


author: Seth
body: I couldn't find one, but there is probably a feature request for this on the [Atlassian JIRA](http://jira.atlassian.com).


Tags: windows
How to continue rebase after resolve conflicts
Asked by Ralph Callaway:

If a rebase generates conflicts that have to be manually resolved, how do I continue the rebase after resolving the conflicts?

I can do this from the terminal with \`git rebase --continue\`, but while stuff I read only line says I just need to do a commit I get a warning that the commit message is empty.

Is that not possible with source tree?

Platform: OS X 10.9.5

SourceTree: 2.0.0


Answers:
author: Cherny D. C. Berbes? I.
body: Yes, it's possible. Just go to Actions \> Continue Rebase. That will continue the rebasing process :smile:

Screen_Shot_2016-02-04_at_6_59_07_PM.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/How-to-continue-rebase-after-resolve-conflicts/qaq-p/215416?attachment-id=10504){#link_116b0694bc23e0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/6342/1/Screen_Shot_2016-02-04_at_6_59_07_PM.png){#display_116b0694bc23e0_0}

comments: author: Patrick Little
body: Yes the option is there, but it throws an error message

git -c diff.mnemonicprefix=false -c core.quotepath=false --no-optional-locks -c lfs.customtransfer.bitbucket-media-api.path=git-lfs-bitbucket-media-api -c sequence.editor='C:\\Users\\patrick.little\\AppData\\Local\\SourceTree\\app-3.3.9\\tools\\stree_gri' -c core.editor='C:\\Users\\patrick.little\\AppData\\Local\\SourceTree\\app-3.3.9\\tools\\stree_gri' rebase --continue  
error: There was a problem with the editor ''C:\\Users\\patrick.little\\AppData\\Local\\SourceTree\\app-3.3.9\\tools\\stree_gri''.  
Please supply the message using either -m or -F option.  
error: could not commit staged changes.  
Completed with errors, see above.

Using 'git rebase --continue' from the terminal works fine.


author: Wouter Vos
body: That option is greyed out for me, does that mean my rebase is complete?

I thought that was the case, but vscode put \* + (Rebasing) behind the branch name that the repository is on.
SourceTree v2.0.1-Mac crash
Asked by Rob Goff:

<https://support.atlassian.com/servicedesk/customer/stsp/problem-report-1388>

Support ticket has crash log attached.

Application Specific Information:  
\*\*\* Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '\*\*\* setObjectForKey: object cannot be nil (key: SSH_ASKPASS)'  
terminating with uncaught exception of type NSException  
abort() called


Answers:
author: ymmyk
body: I had a similar issue with 2.0.3, then I reverted back to 2.0.1 and everything worked. SourceTree then auto-updated back to 2.0.3 and it started to do it again. I ended up re-downloading 2.0.3 manually, but I kept the same app. I noticed the new app was 20MB larger. It appears sparkle caches was corrupt in \~/Library/Application Support/SourceTree/.Sparkle. The sparkle updates probably need some sort of integrity checking via checksum or something.


author: Rob Goff
body: Jay,Here is Atlassian's response:Kah Loun Foong \[Atlassian\] 02 October 2014, 8:00 AMHi Rob,Thanks for contacting Atlassian Support. According to the error, we suspect that the bundle file in the SourceTree application has been modified or corrupted during the upgrade. Please try removing the SourceTree application from the machine and re-install SourceTree 2.0.1 again.Looking forward to hearing from you.Regards,FoongAtlassian Support Team


author: jbardhan
body: Thanks Rob.Your comment, and another post on support.atlassian.com regarding the SourceTree installer breaking the application on an upgrade to 2.0.1, led me to try deleting and re-installing.Works fine now, and I appreciate your sharing the answer you got from Atlassian!A note for Atlassian: the installation appeared to be incomplete, but it's not clear why that happened: the Applications window showed a size of 33 MB when it was crashing, and shows 97.3 now.Best,Jay


author: Rob Goff
body: Jaydeep,Message I got from Atlassian suggested I delete and reinstall v2.0.1. I declined. Instead I restored v2.0.0 from a Time Machine backup, turned off the auto-update feature. Has been working fine, will not turn auto-upgrade back on until I see that Atlassian has released a newer version that resolves the upgrade problem we've both experienced.


author: jbardhan
body: 2.0.1 crashes for me as well, whenever I try to commit or even type in the commit textbox. Also, the sourcetree icon disappeared (it's now just the standard Mac "No icon specified" icon) and most of the menu icons disappeared as well.
How to undo creating a branch and resetting the master index
Asked by Gary Randall:

I created a local repository and made about eight commits. I have not pushed anything to a remote repository. Then I realized that I should have put the last three commits into a separate branch so I created a new branch at the sixth commit and set the master to the fifth commit. There were a couple of changes that had not been committed. Now it appears that I have only the sixth commit in the branch and the last two commits do not show separately on the branch or the continuation of the master branch, so I'm confused as to what happened to them. I did not do a stash before creating the branch or resetting the master.

I believe I need to undo the branch/master changes and start over with all commits in the master. I did create a stash after the fact but am now gun shy about losing the missing commits.

Please Help!

Gary


Answers:
author: Sumali
body: Don't worry, they only disappeared because the only branch that was pointing to the 8th commit was master and after you reset it to the 5th commit there was nothing pointing to the last commit any more therefore it doesn't show up anymore in ST but they still exist.

What you need to do is find out what the commit hashes of the missing commits are (you can do this using the command:

```
git reflog
```

and then it's up to you but you can either cherry pick them back into a branch individually via command line (I can't see a way to do this in ST) or easier maybe is to just create a new branch/tag where that last commit was.

In ST it looks like you can create a new tag and specify a commit hash, so if you use the hash of the 8th commit it should create a new tag at that spot and then at least you can see them again and do whatever you want with them after that .

comments: author: windwagon
body: Good answer! I'd just add: see the example at <https://www.atlassian.com/git/tutorials/rewriting-history/git-reflog>
How can I configure SourceTree to remember my preference not to save the password during authentication to commit/push source code? When prompted the Remember Password checkbox is always checked.
Asked by Matt Doering:

I would prefer SourceTree not to remember the password on my work station for different reasons. When I attempt to commit/push source code I get prompted for authentication and after entering the password I always have to uncheck the Remember Password checkbox.

I would think that it should remember my selection to not save the password.


Answers:
author: Seth
body: I don't think there is a way to configure it as a user. Submit a feature request at [jira.atlassian.com](http://jira.atlassian.com)

comments: author: Matt Doering
body: I didn't think so. I was digging through the registry to see if there was something there but nothing. It's more of an annoyance than anything.


Tags: windows
How to remove private keys on push to a public git repo?
Asked by Brett Best:

I would like to push my repo to a public host but it contains private keys.

How can I remove these before pushing? Can SourceTree do this automatically? I.e. find and replace text on push?


Answers:
author: Seth
body: I don't think Git/Hg or SourceTree provide a way to do this. The entire point of pushing and pulling is to keep repositories synchronized.

At this point, even deleting the private keys from your repo will be insufficient If you're pushing the entire repo, others will be able to look through the repository history to find them.

There is probably a complex Git/Hg command that can iterate through your history and delete all instances of a file, but you'd get more help with that in a larger forum, like StackOverflow or a Git/Hg mailing list.

comments: author: Brett Best
body: Okay what about on committing or do you have another way of handling private keys with a public repo?


author: Seth
body: I think most people would recommend to keep private keys outside the repo. You might consider a separate, private repo where you can store keys and any other non-public documentation.


author: Brett Best
body: Thanks Seth!
How to tell the number of files changed in a commit?
Asked by Janice Vann:

In Sourcetree, how can you tell the number of file changes in a particular commit?


Answers:
author: Seth
body: Click on the commit in the Log/History view, and it will show the list of files with changes in the lower left panel.

The tab for the Log/History view is at the bottom of the interface.


author: Janice Vann
body: Thanks, I know the changed files can be viewed this way. But I have a commit with about 200 changed files. Does Sourcetree show the number of changed files in the commit anywhere?
Sourcetree 2.0 high CPU use under Yosemite
Asked by Nitai Aventaggiato:

Just upgraded to 2.0. See constant 80% CPU usage for it now ![sad](/html/@C495B4504065515364EB1894F812B34C/images/emoticons/sad.png "sad")

This is on Yosemite Public Beta 3.


Answers:
author: Nitai Aventaggiato
body: <https://jira.atlassian.com/browse/SRCTREE-2699>


author: HenriqueA
body: Hi Nitai,

There is a bug reported into Atlassian Bug Tracker ([jira.atlassian.com](http://jira.atlassian.com)) that seems to be the same that you're facing:

* [CPU usage spikes to over 90% when app is hidden (cmd H)](https://jira.atlassian.com/browse/SRCTREE-2684)

<br />

This bug is fixed for the next SourceTree release. Could you please check if is this issue that you're facing?  

Kind Regards,  
Henrique Lechner

comments: author: Nitai Aventaggiato
body: Ok. However, it doesn't matter if ST in the foreground or background. It is constantly at 80%. As soon as I get the update I will upgrade.


author: Seth
body: Please file a bug report at http://jira.atlassian.com
Where can I find a basic guide to using SouceTree from square one
Asked by Tim Dawson:

I'm new to SourceTree (and Git). I can see it may be a great program and if I had a lifetime in front of me I could no doubt work out how to use it. I've managed to do some commits, now I want to fork but I'm having trouble in so many areas it's no use asking a question. I need a manual but can't find it. Help ,please..


Answers:
author: Bal?zs Szakm?ry
body: The question about SourceTree [has already been asked](https://answers.atlassian.com/questions/226308/sourcetree-for-windows-manual).

About Git, just search for "Git tutorial", you will find very many options. If any particular one seems to difficult, change to another until you find one that fits your style of learning/understanding.
.gitignore .idea
Asked by AGC Partners:

Hi,   

I have ignored the entire .idea folder, but there are still some files that are not being ignored at all.  
Even the ignore option in the context menu is disabled for that files.   
One of those is ./idea/libraries/compass_library.xml  

Is there any way to ignore them?  

Many thanks,  

Unai


Answers:
author: Seth
body: Something to check: .gitignore has no effect on files that are already tracked (have been committed before). You will have to Stop Tracking those files. Stop Tracking will leave the files in your working copy, but delete them from your repository.

comments: author: AGC Partners
body: I've stopped tracking them, and it worked fine.

Many thanks!


author: Bal?zs Szakm?ry
body: Your .gitignore might be incorrect, you need

.idea/

(with the "/" at the end) to ignore the whole folder (, but Seth probably has the right answer here).
Can't commit using hg
Asked by Thom Goodsell:

SourceTree has generally worked great for me, but recently, when I try to commit using mercurial to a local repo, I get this error:
> [java.io](http://java.io).IOException: Cannot run program "hg": error=2, No such file or directory
>
> at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
>
> at scala.sys.process.ProcessBuilderImpl$Simple.run(ProcessBuilderImpl.scala:68)
>
...  
I've switched to using System Mercurial, then back to built-in, I've restarted SourceTree, I've restarted my machine, but I still get the error. Any advice for debugging this?


Answers:
author: HenriqueA
body: Hi Thom,

Your SourceTree is having difficult to locate the **hg** driver program, responsible to the mercurial integration.

I would recommend you to try to install the latest SourceTree version (for Mac OS X is 2.0.0):

* <http://downloads.atlassian.com/software/sourcetree/SourceTree_2.0.0.dmg>

Could you please try it and return here to say if it works or not?

Kind Regards,  
Henrique Lechner

comments: author: Thom Goodsell
body: Upgrading to 2.0.1 didn't fix this, but uninstalling and re-installing (version 2) did. I'll just hope it was a one-time error.


author: Thom Goodsell
body: Oops. Apparently it didn't fix it. Still getting the error, especially when using fetch.


author: Thom Goodsell
body: This is on OS X 10.9.4, SourceTree version 1.9.8. (Sorry, just realized there's now a Windows version.)
pulling and pushing subtree hangs SourceTree
Asked by albertarnau:

Hello,

I'm try to work with subtrees in SourceTree and it always hang.

If i tried to pull and push a subtree in a repo SourceTree hangs, but if I try to pull o push with git commands it works fine.

Where is the problem?

Thanks


Answers:
author: albertarnau
body: Hello,

I've find a solution. I've posted it in <https://jira.atlassian.com/browse/SRCTREEWIN-1819>


author: HenriqueA
body: Albert,  

I would suggest you to comment in the [Bug Report](https://jira.atlassian.com/browse/SRCTREEWIN-1819) so the SourceTree Developer can analise your case and better help you on it.  

To a deeper analise if it's possible to provide also the following information in the bug report:
> what's the URL format for the subtree in SourceTree itself? Does it have a username in it?

Kind Regards,  
Henrique Lechner


author: albertarnau
body: Yes It's my case. Is there a solution?

thanks


author: HenriqueA
body: Hi Albert,  

There is a similar issue related into Atlassian Bug Tracker:

* <https://jira.atlassian.com/browse/SRCTREEWIN-1819>

<br />

And here the SourceTree engineer comment:
> Ah, this might be the age old issue where mixed host auth fails with either subtrees or submodules. I think we have this reported elsewhere, but basically there is no prompt for auth when working with subtrees on a different host, so the auth just fails silently and nothing happens.  
> I still have to look into this one and would like to see a resolution as it won't be uncommon that people do this.  
> Cheers

<br />

Could you please let me know if is it your case?  

Kind Regards,  
Henrique Lechner

comments: author: HenriqueA
body: Albert, Just to better help new users that can face this issue, I'm quoting here your comment from the Bug Report :)Hey all,I'm working with Stash and SourceTree and i can confirm that is a problem with the authentication of the subtree.When you add a subtree the url is in this format: <http://user@192.168.9.200:7990/scm/valen/testsub.git>.In this way it doesn't work.you have to change the url for this one : <http://user:pwd@192.168.9.200:7990/scm/valen/testsub.git> and then all works fine.It's possible that it will be solve un futher versions of SourceTree?ThanksAlbert Arnau
Can you diff a working copy file versus another version that is not the previous version?
Asked by Don Robbins:

With sourcetree it seems that you can only diff a working copy of a file versus its previous version. Is there a way to diff the working copy to any version of the same file without having to commit the file?


Answers:
author: Seth
body: If I use "External Diff" by right-clicking a file in any commit, it pulls up a 3-way merge window with my working copy, a copy from the commit prior to the selected commit, and a copy from the selected commit.

I'm using SourceTree on Windows. My diff tool is meld with the paramaters "$BASE $REMOTE $LOCAL".

comments: author: Don Robbins
body: In this case I am talking about files that have not been committed yet. These are files that have been modified and might be staged or unstaged. I would like to diff that file versus any other version like you can when you run log selected without having to commit the file first.


author: Seth
body: Yes, that is what I mean by "working copy" as well. It's whatever file is in my folder structure in whatever state it is in. For a custom diff command, it appears that $BASE corresponds to the working copy of a file. $BASE may not be used for the pre-configured diff tools, I'm not sure.
Sourcetree Repo Error
Asked by Daniel Willitzer:

Since I updated Sourcetree to the latest version 2.0.0 and Git Version 2.1.1 on my local machine (Mac 10.10 (14A361p)) I can not access any of the repos with ST. But they are functioning via terminal issues. Any recommendations?  

'git log' failed with code -1:'launch path not accessible  
'

Screen Shot 2014-09-25 at 1.58.54 PM.PNG


Answers:
author: HenriqueA
body: Hi Daniel,

It look like that your SourceTree can't access your installed git. Could you please try to re-configure the path to your git? Open Preferences, select git and select the correctly place of your git installation.

Kind Regards,  
Henrique Lechner


author: Daniel Willitzer
body: Ended up being corrupt config file.

Thank you @Henrique Lechner \[Atlassian\]


Tags: error

git
Sourcetree commits merge even though commit is unchecked
Asked by jmejiaa1986:

When doing a merge in source tree there is an option that says "Commit merge immediately" If I uncheck that option it should not commit, however it seems the tool is ignoring that option and not letting me review the merge before commits happen.

<br />

Is this just me\>


Answers:
author: Tai Luxon
body: No, it's not just you - I'm experiencing the same thing. Anyone have an explanation, or is this simply a bug? I'm running 2.0.5.2. Thanks!