youngmon/atlassian-qna huggingface dataset:
How to specify custom callback url on authorization
Asked by Ruan Robson:

I am trying to implement OAuth2. I have followed this guide:  

<https://support.atlassian.com/bitbucket-cloud/docs/use-oauth-on-bitbucket-cloud/>

It says that I can include the callback url per request, but I cannot seem to find what the parameter is called to allow me to do this. Can you please point me to some documentation that can clear up how to specify a different callback url, as I cannot find any


Answers:
author: Ruan Robson
body: The property name is redirect_uri

comments: author: Andy Fletcher
body: Hi [@Ruan Robson](/t5/user/viewprofilepage/user-id/4825643) ,

Did you manage to get this to work? I've set my callback url in the OAuth consumer to <http://localhost:8080/callback> but whenever I try to auth with  
<https://bitbucket.org/site/oauth2/authorize?client_id=xxx>\&response_type=code\&redirect_uri=<http://localhost:8080/callback/foo> then in the callback, when requesting the access token, I get an error 'redirect_uri does not match'.  
In fact it still fails if I set the redirect_uri parameter to exactly what I've configured in the consumer.  
Many thanks,  
Andy


author: Ruan Robson
body: Hi Andy,

My setup is as follows:

Button with url:  
<https://bitbucket.org/site/oauth2/authorize?client_id=xxx>\&response_type=code\&redirect_uri=<http://localhost:8080/callback/foo>  
Then in my code (That gets executed on callback/foo) I have a http request with the following details:  

<br />

POST <https://bitbucket.org/site/oauth2/access_token>Request Payload:  
{  
"grant_type": "authorization_code",  
"code": "code from query string",  
"redirect_uri": "<http://localhost:8080/callback/foo>"  
}  
Headers:  
'Content-Type': 'application/x-www-form-urlencoded'  
Auth for this call uses the client id and secret.  

I hope this info helps.


author: Andy Fletcher
body: Aaaah, thank you so much!

The \`redirect_uri\` parameter needs to be on *both* the request for the code and the request for the token! I thought the error was about it not matching the url stored against the consumer in the workspace settings.

Strange that the documentation is so sparse here. I'd read the same page that you'd originally linked to which said you should be able to append to the callback url path but gave no indication how.


author: Ruan Robson
body: I have found this post which has the same question, unfortunately no answer  

[https://community.atlassian.com/t5/Bitbucket-questions/Custom-data-in-callback-url-for-bitbucket-oauth-api-v2-login/qaq-p/999717?utm_source=dm\&utm_medium=unpaid-social\&utm_campaign=P:online\*O:community\*I:social_share\*](https://community.atlassian.com/t5/Bitbucket-questions/Custom-data-in-callback-url-for-bitbucket-oauth-api-v2-login/qaq-p/999717?utm_source=dm&utm_medium=unpaid-social&utm_campaign=P:online*O:community*I:social_share*)


Tags: bitbucket-cloud

cloud

oauth
For Loop to traverse over Project Folder and get the filenames
Asked by Suvojit Ghosh:

Implementing a shell script and calling the .sh file from bitbucket pipeline.yml

Currently facing an issue to retrieve the files inside a folder in the source code.   
need to execute the class files as a post deployment step.

I am using For loop:

for f in /deploy/scripts/\* .cls do

echo "$f"

done

the output should be the the class filenames inside scripts folder but it simply returns the string

/deploy/scripts/\* .cls

any help or advice how to resolve this?

thanks


Answers:
author: Ankit Gupta
body: That isn't the proper syntax, you need to run:

```
for f in $(ls /deploy/scripts/*.cls); do echo "$f"; done;
```


Tags: bitbucket-cloud

cloud

salesforce
ssh-agent.exe not being installed on Windows 10
Asked by Maik Schumacher:

I have installed Sourcetree Version 1.6.25.0 on my Windows 10 computer.

However, the SSH-Agent has not been installed with the software. The ssh-agent.exe file has not been installed as expected here:

\<user-home\>\\AppData\\Local\\Atlassian\\SourceTree\\git_local\\bin\\ssh-agent.exe

Any advice?

Thanks


Answers:
author: Maik Schumacher
body: Obviously this is being fixed here:

<https://jira.atlassian.com/browse/SRCTREEWIN-3939>
Sourcetree error : 'git status' failed with code -1:'Couldn't posix_spawn: error 35 '
Asked by Prajakta Dandawate:

Started getting following error in Sourcetree suddenly (after a merge conflict)

'git status' failed with code -1:'Couldn't posix_spawn: error 35  
'

I am not sure as how to resolve this


Answers:
author: AnkishJain
body: You ram might be eaten by chrome or other applications and there are no resources left for sourcetree. Clean up running applications. It might work. It did for me.


author: roma86
body: Have same issue. Not only SourceTree affected, many apps like photoshop, google chrome, Xcode and others may fire such error on attempt to launch.

Mac OS Sierra 10.12.1 (16B2659)


author: hetulkothari
body: I am using SourceTree version 1.8.2.11 on Windows 10 and get the same error. need help with the fix.


author: joesauve
body: I also just started getting this. Went for a way for about 20 mins, then happened in all my local repos. The commit history screen for each repo was filled with empty commit lines.

SourceTree Version 2.0.5.2 (2.0.5.2)

Mac OS X El Capitan 10.11.2


author: Jennifer Bryan
body: I am also getting this error.

SourceTree Version 2.1 (2.1)

Mac OS X El Capitan

Version 10.11.1

Mine had nothing to do with a merge conflict. It feels out of the blue.
Why "Sourcetree for Windows" crash when start the application ?
Asked by christian_duchesneau:

The process starts and closes as soon .

The application works well since two months but for some reason it does not restart

OS : Win 8.1 64 Bits

What I have tried ( x 2 )   

--------------------------

* Restart computer
* Clean AppData\\Local\\Atlassian
* Uninstall SourceTree
* Reinstall SourceTree (I installed the latest version of <https://www.sourcetreeapp.com/>)
* Empty log file into `AppData\Local\Atlassian\SourceTree\sourcetree.log`

Please can you help me ?


Answers:
author: christian_duchesneau
body: Is that weird but resolved

SourceTree Enabling compatibility mode with Windows 8.
How to manage lots of git tags
Asked by Conor Ryan:

I have lots of git tags in a repo that is used across several teams in our company. The net result of this is that trying to find a particular tag is quite cumbersome. What makes it worse is the fact tag sorting is broken (1.0.2 appears after 1.0.119).

Any suggestions on how to make these more manageable?

We use semantic versioning (MAJOR.MINOR.PATCH) so would it be possible to add a feature to collapse/expand a set of tags based on any/all of MAJOR/MINOR/PATCH number?


Answers:
author: Seth
body: Tags are sorted alphabetically. You COULD revise your naming convention to include leading zeroes, if you have some foresight into how many digits you are likely to use at a particular level (1.0.002 instead of 1.0.2).

Alternatively, just knowing that sorting is alphabetical makes it easy to find what you're looking for. 1.0.2 will come after 1.0.1, 1.0.1x, 1.0.1xx, 1.0.1xxxxx...

Someone else asked this question recently, and it was recommended that they prepend 'v' to their tag names (v1.0.119, v1.0.2). This is according to semantic versioning convention (<http://stackoverflow.com/questions/2006265/is-there-a-standard-naming-convention-for-git-tags>) but I don't know whether it will have any effect on how SourceTree sorts the tags (don't use semantic versioning myself).

comments: author: Conor Ryan
body: Thanks for the prompt feedback. The format vX.Y.Z was SemVer 1.0.0, we use 2.0.0 where the 'v' has been dropped and leading zeros explicitly forbidden.This is just an incompatibility I suppose.


author: Seth
body: Fair enough. Like I said, I don't use it myself, just did some googling in response to your question, and based on a previous answer I'd read. I'd be curious whether SourceTree sorts tags using the SemVer 1.0.0 format more intelligently.


author: Johannes Kilian
body: One issue to mention:

We once used CVS - with a looooot of tags. After converting the repositories to git we tried to push our local git repository to STASH/Bitbucket server using the http-protocol. *This fails due to the limited length of contents of the http-protocol: not all the tags where pushed.*

Switching to ssh-protocol allows pushing all the tags at once (another solution was multiple pushing the repos via http - on the subsequent pushes non previously pushed tags have been pushed - we avoided this method, cause we were sceptical whether all tags have been pushed ...)

So be aware, working with a huge amount of tags using the http-protocol to access remote repos might be problematic - you should consider using ssh in this case.

comments: author: Conor Ryan
body: Thanks for the heads up Johannes. Luckily enough we already use SSH by default.
How do I add an exiting folder to a Stash Repo in Sourcetree without moving or copying the files?
Asked by roni hoffman:

I have a folder that I dont want to move or copy and I want to add to a new repository in Stash. How do I do this in SourceTree because when I clone in SourceTree it requires a new empty folder.

Thanks

Roni


Answers:
author: Tim Crall
body: First, create a new repo on Stash through the web interface. Hit "Clone" and copy the clone URL onto your clipboard, because you will need it in a moment.

On a Mac, File-\>New/Clone and select "Create local repository" and select the path to your directory. Open your new repo from your shortcuts bar and go to Repository-\>Repository Settings to create the remote (pasting in its URL from your clipboard)

On a PC, File-\>New/Clone and select the "Create New Repository" tab. Paste in the URL for the remote.

comments: author: roni hoffman
body: Thanks Tim


Tags: bitbucket

clone

repository
SourceTree does not honour Global Ignore List
Asked by Stefan Guath:

I have a \~/.gitignore_global file that contains ".DS_Store", with a correct path in \~/.gitconfig (i.e."\[core\] excludesfile = /Users/myusername/.gitignore_global") in order to find it. This works just as expected in the terminal, i.e. any .DS_Store are successfully ignored.

But in SourceTree, all .DS_Store files causes "Uncommitted changes". Note that in Preferences -\> Git, the path to "Global Ignore List" is correct (i.e. "/Users/myusername/.gitignore_global"), so apparently "excludesfile" has been properly consulted in .gitconfig. But still, the Global Ignore List doesn't seem to be honored. What am I doing wrong?


Answers:
author: Stefan Guath
body: When entering "git status" in Terminal I get the response:"On branch FooYour branch is up-to-date with 'Bar'.nothing to commit, working directory clean"But when starting up SourceTree the .DS_Store files still causes "Uncommitted changes". I finally managed to get rid of it by executing various manual operations on the .DS_Store files, such as 'ignore', 'delete' and some others that I don't remember. It seems to work now, but it was a long and strange way of getting there.


author: Tim Crall
body: Is there any chance that you accidentally "added" the file before putting it on the ignore? If you go to the command line and do a "git status", what does it report?
sourcetree copy file from branch
Asked by Per Eghall:

Hi folks,

I'm trying to find a way to copy a specific file from one branch to another branch.

E.g. User 1 has been working in the Feature1 branch for some time. Now user2, working in the Feature2 branch, needs a file that exists in the Feature1 branch. Is there a "smooth" way of accomplishing this?

One "dirty" way of doing it would be to copy the file on the local machine (from working directory when the Feature1 branch is checked out) and paste it into the working directory for the Feature2 branch.

Best regards,  
Per


Answers:
author: d10
body: There is a clean and easy way to do this in Sourcetree without checking out:

1. Select the commit
2. Select one or more files in the commit, right-click them, and select "Log Selected". This opens a new window.
3. Right-click the selected commit and select "Reset Files to This Commit".

Done!

comments: author: Bobby Gintz
body: Works great! Thank you David


author: Tim Crall
body: Actually, I just realized, you can do this at the git command line with:

```
git checkout feature2 file2.xxx
```

I don't know a way to do it in SourceTree.

comments: author: Andreea Oltean
body: I am also interested how to do this in Sourcetree


author: Tim Crall
body: User 2 can checkout feature1 and copy the file somewhere - anywhere - it can even just be to a different name in the same working directory (where it will become an untracked file). Then checkout feature2, copy the file back to its proper place and name, and do "git add".

comments: author: Per Eghall
body: Tim,

yes I know, that's the "dirty" way of doing it. I was thinking more of a "quick" way of doing it directly in SourceTree.

Thanks
git pull is not working
Asked by sufiyan momin:

giving me error ---\> git: 'pull' is not a git command. See 'git --help'.

see attached imageUntitled1.png  
[](https://community.atlassian.com/t5/Sourcetree-questions/git-pull-is-not-working/qaq-p/256210?attachment-id=5906){#link_1169ce4d626518}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/8136/1/Untitled1.png){#display_1169ce4d626518_0}


Answers:
author: Tim Crall
body: Try going to to Tools-\>Options and click on the Git tab - are you using Embedded Git or System Git? Either way, I'd try switching to the other (if you switch to System Git, you may have to download and install Git if you haven't installed it as a stand alone). See if that changes the behavior. Something with your git seems really screwy.

comments: author: Kelly
body: Awesome... I was having the same problems, on your recomendation, I downloaded and installed git over existing install... that fixed it up.... sometimes the easy way out! :-)


author: sufiyan momin
body: Yes i can pull from command line. git version is 2.6.2.windows.1Is there any way to reset source tree. I have tried uninstalling it and installed again but not woked


author: Tim Crall
body: Wow, that's weird! "pull" is most definitely a git command. Are you using system or embedded git? What version of Git? Can you do git pull from the command line?
Do I need to purchase a license to use Sourcetree?
Asked by ???:

Hi. I'm just about to use Sourcetree. And I have a question about it.

dkshk.JPG????.jpg

When installing SourceTree, the license term says above. Do I need to purchase a license(paying bills) rather than just free registeration? Still, the QnA just says SourceTree is free and I'm confused about this.

And one more thing. Is my copyright of the project protected when I register 'free' on SourceTree? If there is any harm about this, please let me know.

Thank you for reading! Hope you have a Good day ![laugh](/html/@BEA1CC333F4D830F5303329D7DC07DE4/images/emoticons/laugh.png "laugh")

[](https://community.atlassian.com/t5/Sourcetree-questions/Do-I-need-to-purchase-a-license-to-use-Sourcetree/qaq-p/171101?attachment-id=991){#link_1169ce5f30eaa0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/5057/1/%EC%9A%B0%EB%A6%AC%EB%A6%AC%EB%A6%AC.jpg){#display_1169ce5f30eaa0_0}  
[](https://community.atlassian.com/t5/Sourcetree-questions/Do-I-need-to-purchase-a-license-to-use-Sourcetree/qaq-p/171101?attachment-id=992){#link_1169ce5f30eaa0_0}  
[](/tnckb94959/attachments/tnckb94959/sourcetree-questions/5057/2/dkshk.JPG){#display_1169ce5f30eaa0_2}


Answers:
author: Tim Crall
body: The license contains some old language, but SourceTree is definitely free.

See: [Atlassian website says SourceTree is free. License says otherwise.](https://answers.atlassian.com/questions/32507753).

<https://answers.atlassian.com/questions/154537>

I'm fairly sure that nothing in the agreement impacts your intellectual property rights to your own code in any way - Atlassian couldn't possibly stay in business if they claimed ownership of code people developed using their tools.
Autentication failed and i have to retype the password everytime in sourcetree, why?
Asked by Wing Lo:

I downloaded the latest version of sourcetree in windows version. The authenticate windows pops up all the time and asked for the password. The authentication always say failed and I have to go to "Edit Account" to update the password every time. Anyone else experience the same issue?

Thanks


Answers:
author: dsearch
body: Thanks Tim, the update seems to have fixed it.


author: Tim Crall
body: This is a known defect with 1.6.24. Atlassian has released 1.6.25 to address it.
Updated to SourceTree Version 1.6.24 and now when I Fetch I get message below. Any ideas??
Asked by Edward Pierson:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin  
Access denied  
Access denied  
Access denied  
Access denied  
Access denied  
FATAL ERROR: Server sent disconnect message  
type 2 (protocol error):  
"Too many authentication failures for xxxxxxxxx"  
fatal: Could not read from remote repository.

Please make sure you have the correct access rights  
and the repository exists.

The repository definitely still exists and I had access rights to everything before I did the update.


Answers:
author: Tim Crall
body: There is a known defect with 1.6.24. They've released 1.6.25 which resolves it.


author: Martin Fredriksson
body: The best answer is to never, ever, upgrade sourcetree to latest version (applies to both Windows and Mac versions) if you don't have time to help report bugs. New versions, even minor upgrades, of SourceTree very often bring a large number of problems and crashes. If you install a new version of SourceTree, make sure to keep a backup of an older installer, so you can go back when needed (very often you will need to).
Can't pull from origin and push to branch on a GitHub repo after update.
Asked by Vivian Hodgkinson:

Running SourceTree V1.6.24.0. After the update this morning I am unable to push to my master or pull from it.

I get an authentication error however if I go to view -\> Show Hosted Repositories I can see the repo and it seems that SourceTree is logging in to the account in question. Please help I cant commit any of my code at the moment.


Answers:
author: Vivian Hodgkinson
body: Second update fixed the Auth issues


Tags: authentication
Bug - GitHub Authentication Failure v1.6.24
Asked by Matthew Prothero:

Earlier today I updated SourceTree to version 1.6.24 and it is now failing to authenticate with GitHub - it always reports invalid username/password even when I know they are correct.

We are not using 2-factor authentication so that isn't the problem.

One of my colleagues confirms that 1.6.23 worked fine for them but upgrading to 1.6.24 also stopped them from authenticating with the same error.

When will this be fixed?

EDIT: Experimentation shows that it still works via the terminal, just not when performing the actions using Sourcetree.


Answers:
author: Johannes Kilian
body: This seems to be an issue with SrcTreeWin 1.6.24

See:<https://jira.atlassian.com/browse/SRCTREEWIN-3957>

**Workaround: Downgrade to older SrcTreeWin version ...**


author: Lou Laughlin
body: Thanks for the update that this is fixed.


author: Matthew Prothero
body: Looks like this has been fixed as of v1.6.25. No need to downgrade any more :smile:


author: Brad Buhrkuhl
body: Same problem here but with Assembla's hosted GIT.


author: sam mayes
body: same here downgrade worked


author: Nicolas Larcipretti
body: Same here. Any workaround?

comments: author: Johannes Kilian
body: Hmmm ... isn't my suggestion to downgrade a workaround?


author: bartcsu
body: I also was hit with this bug.Uninstall Sourcetree.Reinstall. This version seems to work for me.<http://downloads.atlassian.com/software/sourcetree/windows/SourceTreeSetup_1.6.22.exe>


author: Chris Lee
body: Same problem for me, but authenticating to a repo on Stash. Same credentials work on the command-line, and in the web interface. Have tried both embedded and system version of Git - same repetitive login dialog.

What's interesting is after trying a few times, I get a different message saying I need to enter a Captcha, so it's sending **something** to the server, just not the credentials I am supplying.

Could use a quick fix / workaround please (I guess I'll be using command-line only for now).
'ssh-agent' ???? -1 ???????
Asked by Hiroshi YOSHIKAWA:

Q1?OPEN SSH?????????

System.Exception: Unable to to start 'C:\\Users\\h.yoshikawa\\AppData\\Local\\Atlassian\\SourceTree\\git_local\\bin\\ssh-agent.exe' check the git installation.()

??????????

??????????ssh-agent.exe?????????????????

???????????????

?????????????????????SourceTreeSetup_1.6.24.exe

?????????????????????SourceTreeSetup_1.6.4.exe??????

??????????????GIT????????1.95???

?????????????2.6.1???


Answers:
author: Hiroshi YOSHIKAWA
body: I tried 1.6.23,1.6.25 And Askpass.exe.config.

but same error occurs.

???Putty/Plink????????????????????Gitlab??????

Clone??????????????...???????


author: rrudnicki
body: Hi Hiroshi,

Looks like SourceTree is looking for ssh on Git Embedded while you are using a System Git. For testing purposes, can you try to change for Embedded Git? You can do this going to SourceTree Menu -\> Preferences - Git.

Your issue looks very similar from this answer I've replied sometime ago: <https://answers.atlassian.com/questions/32519165>

Another factor that might causing this issue is some antivirus or firewall blocking the ssh-agent. Please check this as well.

In case you still face issues, please feel free to raise a ticket with SourceTree Support: <https://support.atlassian.com/servicedesk/customer/portal/1>

Kindly regards,   
Renato Rudnicki

comments: author: rrudnicki
body: Hi Hiroshi, I just realised you might facing this ST bug: <https://jira.atlassian.com/browse/SRCTREEWIN-3944>One workaround is you download to version 1.6.23


Tags: language-ja
Why does Atlassian keep SourceTree versions known to crash as latest version?
Asked by Martin Fredriksson:

When the latest version of SourceTree is known to crash, why not just remove that from the sourcetree download site? This would prevent old users from updating to a version that crashes, and it would prevent new users from having their first experience of SourceTree being a crash.

The current latest version for Mac, 2.0.5.8 keeps crashing, and it is still the default version to download and to upgrade to. Anyone making the mistake of updating to the latest version can download 2.0.5.5 which works much better (<http://downloads.atlassian.com/software/sourcetree/SourceTree_2.0.5.5.dmg>).

**Edit**: updated latest version 2.0.5.8 which also crashes.


Answers:
author: Johannes Kilian
body: This questionis also valid for latest SrcTreeWinVersion 1.6.24 - see <https://jira.atlassian.com/browse/SRCTREEWIN-3957>
SourceTree crashes on wakeup
Asked by ericoff:

After the computer goes to sleep and I wake it up later, sourcetree has crashed. Everytime.

Any solution to this?

Version 2.0.5.7 for OSX


Answers:
author: rrudnicki
body: Hi Erico,

There is currently a hot [bug](https://jira.atlassian.com/browse/SRCTREE-3273) regarding this version of SourceTree. Could you open a Support ticket and attach the crash log onto them? A SourceTree engineer will attend to you on the Support ticket.

Cheers   
Renato Rudnicki


Tags: mac