SourceTree: Failed to write refresh token to keychain

I'm using macOS Sierra (10.12.2) on MacBook Pro (Early 2011). I have been using SourceTree since last year but this is the first time I am adding my accounts after I clean install my OS. I used to manually clone the repositories one by one.

I just installed SourceTree 2.4 (93) and try adding second account. That's when I found an error.

When I first download SourceTree, the setup process walk me through setting up the first account, which is GitHub account, at that works fine. After that, I go to Accounts in `Preferences` and add my second account which is Bitbucket account. I can `Connect Account` just fine and my username showed up. I click OK and then go to `remote` repository tab to see repository. That's when SourceTree display an error as follow:

Screen Shot 2559-12-28 at 2.39.18 PM.png

I was asked to enter the Atlassian account again. I entered my username and password, but the error still keep coming back.

Then I tried running SourceTree from terminal, and I see that SourceTree cannot write token in keychain as follows:

Screen Shot 2559-12-28 at 2.41.30 PM.png

So it seem that the problem is: SourceTree cannot write to `Keychain Access`, except for initial setup.


Are there any solution to this problem?
Thank you very much!


3 answers

I have the exact same problem, and it is infuriating. The latest updates to SourceTree for OSX have broken both this and SSH functionality.

I'm also having this issues and I'm interested in a solution.

Same issue here - fails for Github for me

Suggest an answer

Log in or Join to answer
Community showcase
Brian Ganninger
Published Jan 23, 2018 in Sourcetree

Tip from the team: workflow and keyboard shortcuts

Supported Platforms macOS Sourcetree has a lot to offer and, like many developer tools, finding and using it all can be a challenge, especially for a new user. Everyone might not love ...

229 views 0 3
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot