Community moderators have prevented the ability to post new answers.
The Apple Keychain actually requires a username to be known in advance for the password lookup to work; if you don't include a username in your URL then SourceTree remembers the last username that was used to successfully log in to a given host and tries that one by default to look up the keychain entry. This can, however, be unreliable if you don't use the same username all the time on a given host. To make it unambiguous, include the username in the URL, like this:
http://username@host/path/to/repo
How was this even accepted?!! That didn't help and won't help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. It worked. This is the correct anwser. No need to run pull on the terminal. In my case is simple as editing the repo URL and include my user as you mention, BEFORE the host. After that I restarted SourceTree and problem solved. The same applies for each new repo. Thanks! :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I use code.aliyun.com for git trusteeship, then the sourcetree says "Password Required For user git on host code.aliyun.com". After I changed the url to "https://username@code.aliyun.com", the problem solved.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can change the URL from 'Repository -> Repository Settings... -> Remote -> Edit'.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For me, after including username and putting the URL "https://username@code.aliyun.com" , it is still asking me for the password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not only did this not help, but it broke things even further, making it impossible to do anything with the remote.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That worked for me, Thanks!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This didn't work for me. I'm using v 2.7 on Mac
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Trung Vu 's Use system GIT within SourceTree's preferences solved the issue.
Appears to be using an older version of GIT: 2.10.1, instead of 2.17.1
OSX 10.11.6, SourceTree Version 2.7.6 (177)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked wonderfully! Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After months of just putting up with this issue, and hours spent trying to get it working again to no avail, @nebrekab's suggestion solved my problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use system GIT also solved this problem for me. Even when system git was in use -> switched to embedded and back to system, same version, same git, but it works now
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Google and tried for several hours, USE SYSTEM GIT is the only way works for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
has the only working solution so far... it shouldn't be a comment
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi everyone, this is Ana from the Community Support team!
We’re seeing several recent responses saying that the solutions provided here do not work. This post originated in 2012, so whatever was valid at that time doesn’t necessarily need to be valid now. There could also be different reasons why Sourcetree is asking you for credentials, so there isn’t really a unique answer.
To make sure we’re helping everyone, I’ll be closing this thread now. If you encounter this issue now and the solution provided here doesn’t help you, please submit a new question and make sure to add the following:
Thanks and see you around :)
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1. go to terminal in your project folder
2.
git config credential.helper store
3.
git pull
4. input your username and password
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the only thing that worked for me. Thanks Albert.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
+1 THANKS!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works for me. Sourcetree 2.7
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the only solution that worked for me. Using sourceTree 2.7 for Mac. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Everything else above failed to work, this worked perfectly though, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only one solution, that worked for me.
SourceTree ver.: 2.6.10.0
System Git ver.: 2.18.0 + git-lfs v2.4.2
Win 10 Pro 64bit
Thanks!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me (macOS). Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works for me. +1 THANKS !!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks ,
Worked for me as well
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This was the only solution that worked for me. Thanks so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this is the real good solution.
Especially because, in case you don't have https support in your server, you cannot just switch to it...
Thank you very much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Simple, correct answer. Thank you!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This one has been plaguing me for months. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me. SourceTree 3.0.1 on macOS
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
+
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Well done, That is perfect.
Is that a bug ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thank you!!!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Nice one! Worked simply/easily for me and - based on the upvotes and other people it worked for - this should be the accepted answer.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me, Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This also works!, looks like the only one that doesn't work is the accepted one :p
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This really worked for me after so much wasting effort on other solutions. Thank you so much Albert!
Source Tree: 3.1.1
Xcode: 10.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have same problem and troubled me for a long time, now I found a solution.
1. go to terminal in your project folder.
2. run #git pull
3. input your username and password
4. go back to sourceTree and run Fetch or Pull, it does not ask your password again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me too
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Amazing! Thanks for this, it works like a charm. After doing the Git pull command in Terminal, the next time you fetch, pull or push, it asks to allow Keychain to be accessed by Sourcetree, and when clicking on "Always allow" you don't have to enter your password anymore!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the tip - this solved my issue as well!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for pointing this out - totally worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This solution is only working on Terminal. @Steve Streeting solution is working for me, SourceTree 2.2.4, Mac OSX 10.11.3 El Capitan
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I tried but no success, but then I figure out:
- SourceTree use Embedded Git service
- Terminal use System Git, which I install via XCode
So, I just need to update SourceTree config via "Preferences -> Git tab -> Git Version" by select "Use System Git", then everything works well
Don't forget run steps as @Owen Peng suggest above. good luck
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @TrungVuANT,
It's totally working with your solution.
"I just need to update SourceTree config via "Preferences -> Git tab -> Git Version" by select "Use System Git", then everything works well"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@TrungVuANT's solution worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Helped in my case. Thx!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Helped me. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This works!
Thank you... I almost went crazy!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This has been bugging me for ages. I have an answer that now works for me on SourceTree V2.6 (123).
First go to keychain and remove any bitbucket entries (you may not have to do this but it helped me to work out that sourcetree had actually entered something)
Under sourcetree->preferences go to Accounts
Click edit
Change Auth type to "OAuth" from Basic
Click on "connect account"
login to the bitbucket page from the pop-up window
Make sure protocol is 'HTTPS'
Hit 'Save'
Bring up one of your git repos and pull it from bitbucket.
The first time it will ask if it can access keychain. Hit 'Always Allow'
You should then have pulled the repo.
Check in Keychain access to see if there is a new entry called 'Bitbucket Credentials'
If you have this then sourcetree should not ask you for your bitbucket password in future.
Time will tell if this keeps working. Good luck.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
OH SWEET JESUS! After searching about this problem for over an hour and trying several different fixes, this is the one that FINALLY WORKED for me.
I had previously set-up two-factor authentication for Bitbucket and tried using an 'App Password', but that was not good enough. I couldn't make the repeated auth requests stop until I switched from 'Basic' authentication to 'OAuth', as Darren suggested.
I am running SourceTree 2.6.2 on Mac OS Sierra 10.12.6
Sanity Restored.
Thanks, Darren!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After a previous reply that said I had fixed this with System Git, I was still prompted over and over for BB creds.
Darren's solution seems to be working though!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Woo-hoo!
Thank you, thank you, thank you.
Cheers, @CobaltGray!
🎉
Note: I had to make sure the protocol was set to 'HTTPS' before logging in from the pop-up window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I keep getting emails about how other people solved this, and smh, @CobaltGray still has the only answer that worked for me. I'd upvote it more if I could.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Crazy that this is still an issue after so many years, but I ran into this today. The fix was to install git on the computer and use that instead of the embedded version. After a git pull and entering the credentials there I can now work in SourceTree without it asking for password all the time.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me, too. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Tried so many other solutions, but this is the only one that worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank You! All I had to do was switch from Embedded to System Git.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is driving me MAD. Every once in a while, typically after some obscure update, SourceTree on MacOS starts to require my password on any push or pull action. Sometimes it works for months, then suddenly, I have to type in my password again. This is so strange. What is causing this, and why can't they fix this once and for all?! I am really considering to switch to GitKraken now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are seeing this eaxct problem for two accounts on our Team and it seems Atlassian have no clue what is going on, since they choose not to offer an answer to this crippling bug.
We have tried all the suggested 'fixes' but none have worked.
A source control system that you cannot access is not only completely worthless it is also endangering projects.
Atlassian how about you actually address this matter, since by your own account you are now comitted to provide support via the community.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
For me, setting the Git client to "System Git" has solved the problem for now. But I have no clue why this has to be done once in a while. And until then, I already have forgotten that this setting is available. It's a shame that remembering the password does not just work out-of-the-box. This is such an essential feature, especially if you're using long, cryptical passwords, as I do. Always having to open your password manager is pretty annoying.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yeah if it was only an inconvenience it wouldn't be quite as bad, however we have users that are denied access to their account after a while of having the 'Ask for password every time' issue.
So basically the problem escalates from an annoyance to a complete blocker.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Tom Brückner setting "System Git" solved my issue for now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Setting Sourcetree to use System Git worked for me as well.
If I HAD to guess, I would imagine this error is permissions-based. If the copy of Sourcetree tries to read the keychain value for bitbucket, and can't, then it needs to continually ask.
When changing to System Git, since it's apart of the user's path, I think it actually triggers the system to display the dialog box asking for permission.
Again, at any rate, using System Git and running `git pull` worked for me.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I don't understand why there is a seemingly great accounts feature but still get keychain pop-ups...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is still happening. Strangley it seems that if there are many differences SourceTree flakes out and tries to authenticate. You should be able to duplicate this by say coping a version of a project that has CR/LF windows style line endings but the repository has Linux style line endings. Removing the windows style line endings stopped SourceTree from trying to authenticate.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Remove all other authentications section in sourcetree other than git hub.
Then click Add or either go to Hosted repositories(to quickly check if it was successful) and click on edit accounts.
In credentials select OAuth and select refresh token. You will be redirected to bitbucket website and click on Grant access.
Now goto your fresh account in sourcetree and select Set as Default.
Done. Now you should see all your repositories in hosted repositories. It shows login error if it is not successful
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I was running into the same issue and then realized that my SSH agent did not have my SSH keys loaded. So make sure that you have your SSH key loaded if that's how you are talking to your git repo server.
See here for more details of how to check you agent and see which keys are loaded: https://confluence.atlassian.com/bitbucket/set-up-ssh-for-git-728138079.html
Also see this if you discover that your keys are not loaded at startup/login on macOS Sierra:
Hope that helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
I too faced the same issue and got resolved.
Please follow below steps to resolve.
Source Tree -> Tools -> Options -> Updates -> Click on 3.0.12.2543 for update
Source Tree -> Tools -> Options -> Git -> GitVersion -> Click on Embedded and Update Embedded buttons.
Restart source tree and it works fine.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
same worked for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Came across this same issue and multiple posts too. So consolidated my research and fix at one place https://stackoverflow.com/a/52884626/5107365. Summary is, problem solved when I used the same password for Atlassian's account address(which is the Gmail ID I used to OAuth to my bitbucket user), as that of my Gmail ID.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please refer this link for solution: https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-keeps-asking-for-bitbucket-password-on-windows/qaq-p/241278
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I just changed my password is it is no longer asking me for my password every few minutes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Use stable version 2.6.3 to get rid of this problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Using ssh connection but always prompted for a password. If I enter the password several times push does work but the password is never saved.
For me the solution was a bit more obscure.
By default ssh will always check for ~/.ssh/id_rsa and attempt to use that for any connection. In my case that id is not relevant for git, but is used for ssh to a different server.
The solution is to add a an entry in ~/.ssh/config which tells ssh to only use password.
Add the following lines:
Host myhostname
PreferredAuthentications keyboard-interactive,password
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Check in your settings in the Bitbucket account. On mine it was using https, I put ssh and all fine now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I had the similar problem. Every fetch/pull/push action requires password from my github account. I found the answer for this problem here
https://answers.atlassian.com/questions/219115/changing-password-in-source-tree-1-6-1-mac-13<br< a="">>
It helped :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the same problem as Anton Trapp. Has a solution been found?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sourcetree keeps asking me for login and password when pulling from external git or mercurial repository. I've tried different things:
- removing keychain entry: no result
- reinstalling sourcetree: helps, but the bug re-introduces itself soon and then until next reinstall it is still there.
During single pull it asks for password always two times. Adding user name to connection stirng helps in the form, that it remembers user name but still asks for password.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.