It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Sourcetree Removing KeyChain

Richard Inskip Jan 16, 2014

Good afternoon,

I have had a problem since updating to Mac OSX Mavericks 10.9.1 that when I try to Pull/Push/Fetch from a bitbucket Git repo it asks for my password. I enter my password and the operation is successful. A few moments later a prompt asks if I would like to give Source tree access to my keychain. At this stage a new entry is present in the keychain. I seleted Always Allow from the keychain access prompt and now the keychain entry is removed and the next time I request a push or pull I am required to provide my password.

From other questions I am using a http://<username>@bitbucket.... url, I have removed and readded the repo and also removed and readded source tree. I have tried to use KeyChain FirstAid and also Disk cleaner to check for inconsistent permission. Nothing yet has changed the problem.

Any advice?

8 answers

1 vote
James Newman Apr 02, 2014

This issue occured for me due to not having read permissions on all repositories that were bookmarked in SourceTree.

I fixed this issue by removing remotes from any repositories I no longer had access to. I then added my password back to the keychain and it has yet to ask me for my password again.

I'm guessing this could also be fixed by simply removing the bookmark in SourceTree.

0 votes
SK Feb 10, 2014

I am having this exact same issue. There is a point where the entries stay in keychain and SourceTree works without asking for passwords, but after some time the old saved entries are removed and the password is required once again. It seems like this occus when SourceTree wants to refresh the remote status after not having done so for a bit. I am on OSX 10.8.5. Can some one from Atlassian SourceTree comment on this issue?

0 votes
Brad Fol Mar 07, 2014

Also experiencing this issue, extremely frustrating.

OS X 10.9.2 with Sourcetree 1.8.1

0 votes
Maurizio Margiotta Mar 16, 2014

Same problem here

0 votes

Hey there,

I've just fixed some issues with HTTPS URLs and the keychain in SourceTree, but they're relating to usernameless URL formats. This seems odd as we haven't changed anything yet, and from all the tests we've done we've not spotted anything unusual. There's not been any reports on jira.atlassian.comyet which is where us developers generally look, unfortunately we don't have much time for AAC as we'd like.

If you actually check the keychain can you see the precise URL that's being used as a remote in your repository?

Also, are there submodules that could be asking for an update which aren't in the keychain for some reason?


Kelvin Chung May 15, 2014

I'm experiencing the same problem where the keys to the Stash repository that I am working with suddenly disappear from my login keychain when prompted by git-credential-sourcetree for access. (Subsequently leading to password prompting due to missing keychain paths.) I basically had to re-establish the key by going into the repo settings and reconfiguring the remote to add the key back to the keychain. This would last until git-credential-sourcetree would ask for access again.

Upon inspecting the key in the keychain, I noticed that the "Where" attribute is blank. I haven't had a problem so far when I have added the remote URL's domain to the "Where" attribute by hand, so I suspect there is something amiss here.

The credential helpers work by having 'get', 'store' and 'delete' calls to them. We recently (correctly) implemented all of the calls so that Git will call 'delete' and 'store'. SourceTree doesn't actually call these functions, it's Git that does it.

If auth fails then Git may call 'delete', removing the key from the keychain so that it can try again. This may be what's happening in your case. The username sticks around because SourceTree stores that against the remote URL.

What version of SourceTree are you using?


Kelvin Chung May 18, 2014

1.9.2 on OS X 10.9.3 here. So far I haven't seen any issues when the "Where" field in the key is filled in correctly; the key was created without the "Where" field set...

I don't have any keys with the 'where' field is set. What are you expecting in there?

Kelvin Chung May 18, 2014

A domain of some sort, I suppose. eg. https://stash.mycompany.comor something.

I know that my GitHub key has this set, but my Stash keys do not.

0 votes
Kelvin Chung May 18, 2014

A domain of some sort, I suppose. eg. https://stash.mycompany.comor something.

I know that my GitHub key has this set, but my Stash keys do not.

0 votes
Pavel Subach Sep 14, 2014

Version 1.9.8 (1.9.8) / OS X 10.10 b7

Also remove password credential from keychain.

Tschoatscho Kettl Dec 04, 2014

...which is a real show stopper. If I allowed SourceTree access to my MacOS keychain I wouldn't expect that it will remove my Github credentials in any case (even if there's a reason from Atlassian's point of view). So please stop this: You should never use write access on my system keychain regarding anything else than your own domain. Github is not part of your domain.

0 votes
David Lormor Oct 22, 2015

Same issue here. Please implement a fix (been dealing with this for months!).

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,971 views 1 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you