If I pull updates from a remote repo on Github I have to enter my password everytime (twice). In the SourceTree log output I find:
2014-05-20 09:06:09.581 git-credential-sourcetree[33632:507] Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could not be found in the keychain.
Is there a way I can SourceTree make remember my password? I do not see a checkbox or an option.
Hey there,
Questions would be, are you using HTTPS or SSH? Did you add the auth details to your keychain when you authenticate? Did you correctly authenticate? That error (which generally shouldn't appear in later versions of SourceTree as I made improvements to it) is just trying to find the item in the keychain against the remote and username. You could always check your keychain, too.
Cheers
I am using HTTPS. The repo is setup like this:
https://username@dev.some-server.eu/stash/scm/client/mobile.git
How would I add the auth details to my keychain?
What can I check in the keychain? What would I look for?
I think what I did was: I had the repo already on my disk. I then added the existing repo to SourceTree.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Pictures speak a thousand words. Should only take you a minute, hopefully, then it's added there for good. I need to test this myself yet though, which I'll be doing this morning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just to clarify, other users are experiencing the same problem. My testing yields nothing because the particular case it happens in doesn't happen for everyone. The next version of SourceTree definitely has a fix for this.
Thanks for your feedback, it led me to the problem :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
git config --global credential.helper osxkeychain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This resolved all GitHub password issues for me in SourceTree. Thanks Marnix!
macOS 10.12.3, SourceTree 2.4, & GitHub 2FA
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, fix all my https issues as well!
This bug is still present in latest release...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This solved my problem as well, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It helped me too - all repos using https are working. It still asks for password when your remote url is using SSH but at least something works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Helped me as well. Thanks Marnix!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This one worked for too, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
WORKED LIKE A CHARM. THANKS!!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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! It worked!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Excellent. Thank you. Still corrected my problem in 2018.
Alternatively, manually add these lines to each relevant git config:
[credential]
helper = osxkeychain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks! This solved my issue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
many many thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Reference for that git command: https://help.github.com/articles/caching-your-github-password-in-git/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
genius!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
got it in one. strong work.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You're my new god, thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Worked!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks, it works also on macOS Mojave 10.14.6
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you very much! This works for me. After clone code successfully, I use terminal to run this code -> sourcetree password is saved.
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 too.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
On a second thought no it didn't. It appeared asking me the password again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wow
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My problem is resolved.
Thanks Marnix!
Worked on macOS Catalina version 10.15.3, Sourcetree version 4.0
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
wow
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.
It has everything to do with keychain.
1.Go to applications and find keychain access in mac.
2. Search for the keychain for bitbucket.orgor wherever your repo resides
3. Select the keychain that has your credentials for bitbucket. Select to access control tab.
4. Click "+" mark and add sourceTree. This way, the SourceTree has access to the given key chain. Click on allow always when popup appears in SourceTree.
I had to do this when I wanted to clone a repo that used different set of credentials.
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 a lot! That fixed the isse 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 did the trick - thanks :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This doesn't solve the issue in SourceTree 2.2.4 on Mac OS X El Capitan. I think there's still a bug in the new major version of SourceTree, since downgrading to the previous SourceTree version fixes the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Works! SourceTree Version 2.2.2, El Capitan 10.11.1
Thank you - was looking for a solution for weeks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This solved it 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.
Thank you! This solved the issue
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.
Thank you so much :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Has anyone ever actually figured out how to get Sourcetree on Mac to start remembering passwords again? It's starting to get pretty old having to retype my password 100 times a day, but none of the solutions I've found posted online have worked so far.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Just started getting this today. Cleared out the 2 Bitbucket entries (1 from the web, 1 for sourcetree) in the keychain and restoring them doesn't change anything. Sourcetree still asks continually and then I get the same error message that @Wei Xia has posted.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Running into the same issue with most recent update to Yosemite (10.10) / Sourcetree (2.0.2).
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
$ git config --global credential.helper osxkeychain
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a duplicate of this issue here: https://answers.atlassian.com/questions/43716302
Access your repository in the terminal and commit, pull, push etc. This fixed the keychain access issue in SourceTree afterwards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked well for me...
First had to enable Keychain storage of my passwords:
https://help.github.com/articles/caching-your-github-password-in-git/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm running SourceTree 1.9.7 on Mac OS 10.9. I was experiencing the same problem, and Tejas' fix above didn't work for me. The IP address of my Stash server changed recently, and I updated the IP address in 'Repository Settings'. Although this worked, I would be prompted twice for my password when attempting to pull or commit, and 'Refresh Remote Status' wasn't working properly. I then read a post elsewhere that suggested to select View --> Show Hosted Repositories, Edit Accounts --> Edit Account, and ensure that the IP address is updated there too. It contained the previous IP address value, and I updated it. Then, when trying to pull, an SSL certificate error appeared. The solution here is to hit the Stash server using Safari (it has to be Safari), and when the certificate warning appears, view the certificate, select 'Always Trust', and save. After that, all operations worked properly from SourceTree, and I am no longer prompted to enter my password.
It might be a good idea to delete any Keychain entries that are present for the Stash server before beginning the process above, just to make sure you're starting fresh.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Having the same issue: SourceTree (version 1.9.6) cannot remember my password in MacOS X (Maverick). Is this a SourceTree issue or Mac?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I'm seeing the same issue, still, on SourceTree Version 1.9.4 (1.9.4) and Mac OS X 10.9.3.
Seems to have "suddenly broken", either because of a SourceTree update or system update -- not sure which; but currently the product is unusable.
Tried clearing out any "bitbucket" keychain entries; that didn't help.
Also tried looking in "~/Library/Application Support/SourceTree" (per other posts), but there doesn't seem to be anything in there that's storing credentials, naturally.
Thoughts?
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.
After much testing, it seems this is the only real solution, which works great for me
https://stackoverflow.com/a/35942890/352552
git config credential.helper store
then
git pull
provide user-name and password and those details will be remembered later.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This definitely 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.
This is still not working in SourceTree 2.1 and OSX El Capitan.
Noticed that sometimes when I try to pull from repository and then I click 'Always allow' for keychain question, bitbucket key in keychain gets deleted!
Even happened that SourceTree won't start. Then I had to manually add key in keychain for bitbucket.
Tried to allow all aplications to access that key, but doesn't help because SourceTree deletes key and writes it again!
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.
In Mac, it can be changed by clicking on Gear icon > Accounts. Alternatively, you can go to the "Keychain Access" utility on the Mac, search for the remote password and delete the stored key. Then the next time you start SourceTree, it will ask you for your new credentials. Let us know if this worked for you! By using Niresh Mac OS X Yosemite
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
nothing worked for me. I removed all accounts from SourceTree, generated new SSH Keys, by following these instructions:
https://confluence.atlassian.com/bitbucket/set-up-an-ssh-key-728138079.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I hope my answer helps others because I had been struggling with password issues with SourceTree for quite a while and finally figured out the issue. I have SourceTree (2.7.6) on Mac (Sierra 10.12.6) and repo is on TFS.
I had changed my network/Mac password, that also meant that my tfs repo password was changed too. But this password didn't change on my Keychain Access credentials for tfs. So, I went to Keychain Access and looked for 'tfs' (found two entries). One of them still had my old password. I changed that to my new password and added SourceTree in the AccessControl tab (by clicking '+' at the bottom). Everything works like a charm now :).
Fingres-crossed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Finally! Solved this for myself after DAYS of trying every single thing in every possible thread - thanks everyone for providing enough clues for me to get to the bottom of my issue...
So, for me, it seemed to be ONLY my username that was causing the trouble.
In Sourcetree - Preferences - Advanced...
Have a look at what your username is. I had four entries https:gitlab, myusername@gitlab etc, but all the usernames appeared to be my 'display name' at gitlab rather that a 'real' username. So I went to Gitlab to see what it thought my actual username was, and it was actually my full email address, including @ and .com - once I had changed this in preferences\advanced on the https:// account and deleted the rest, I haven't been asked for a password since and all seems right with the world! Best of luck, everyone.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have been banging my head against this for just one repo for a while. This worked! 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.
Nice one! Never thought I'd be useful on any git-hub-lab-repository thing, whatever they are! Cheers ;]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Was happening all the time on macOS 10.12.5, SourceTree 2.5.2.
Had to go to Keychain Access, remove all (SourceTree) entries (if you search for SourceTree, you'll find "<reopSite> Access Key for <username>").
Thay dated a few months back.
After that, open SourceTree > Preferences > Accounts > Edit (for each account), and enter the passwords again.
It should prompt the Keychain Access popup again, and this time, you should see new entries created.
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 had this same problem recently. My company migrated from Stash to Bitbucket, so the keychain was storing it as Bitbucket but my repository was pointing at matt@stash. Once I updated the repository settings it started working.
Steps were to go to "Repository" | "Repository Settings" | "Remotes" and edit the path their to say "https://matt@bitbucket.com..."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
go to set you General ,chose NetWork change you Username for you Host(github.com).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I also encountered such a problem, the last is such a solution
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.