Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How do I convince SourceTree to store my password in my keychain?


Using ST v2.5.1 on Mac OS 10.12.5 connecting to a private git server through ssh. Every operation to/from the server requires I enter my password in the pop-up dialog, twice. I have read through all the support articles I can find and none of the solutions/work-rounds work for me. 

The remote URL is of the form myuser@myserver.tld:path/to/origin

I have tried embedded Git and switched ST to use System Git (2.13).Same behaviour using both.

I have carried out push/pull operations in Terminal

I have run ssh-keygen to create new keys

I have created an 'account' for the private URL and enterd my ssh credentials

I have set git config --global credential.helper osxkeychain in terminal

I have checked my keychain and there is no record for ST at the URL of the server. As there is no record I cannot set its permissions (one of the other things I have seen that worked for other people)

Does anyone have any other ideas? Atlassian even suggested that v2.5.x would fix this problem, but not it seems, for me.

4 answers

1 vote
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 25, 2017

Hi Mark,

With 10.12, I believe there is something you can update a setting to include the Keychain:

Also, can you check you SSH config to see if it is pointing to the correct keyfile? (see:

I should also note that if you're not using Bitbucket Server, you shouldn't add the account under "Preferences > Accounts"



This is a brutal thread - after much testing, it seems this is the only real solution, which works great for me


git config credential.helper store


git pull

provide user-name and password and those details will be remembered later.

What I've done with success :

open in hom dir  ~/.gitconfig , and add :

[credential "https://domaint.private.server"]
username =
helper = store

one for each server !

I have tried all the techniques all the helpful people here have suggested and it still does not put anything into the keychain. I uninstalled the app, switched to the admin user, downloaded another copy, installled that and it DOES put an entry in the keychain and only asks for the password once. So I switched back to my user account, installed a fresh copy of ST and was ever hopeful it would work. It did not. 


So my conclusion is this is a permissions issue rather than any kind of unique git setup. Why does ST when running in my user account not store details in my keychain but an admin user does?

I also tried a different approach, but it only highlights what I believe is the root cause: I tried to clone a new repo. When entering the url I deliberately left off the username part of the url. ST correctly asks me for the authentication details. I entered the username and password. Store Password in Keychain was ticked. After entering the details, it came back to ask me for it all again. This repeated many times until I got bored and clicked cancel instead.

This confirms to me it is a permissions issue with ST negotiating with the keychain incorrectly. Is this fixable?

Hi Mark,

I encountered almost the same problem as you. The symptoms appeared when I used a Windows version SourceTree to update the repository and I thought I'd screwed up the repository because of the CRLF issue. However, I had another Mac that works very well with the repository. On the Mac that has the problem, I notice that the password with key name "<git server IP> Access Key for <user ID>" was missing. So, I tried to manually create that key but seems I cannot update the "Where" field to "SourceTree". Then, I deleted all password keys for that GIT server in the Keychain, uninstall and SourceTree again, the problem then solved. Now the password key "<git server IP> Access Key for <user ID>" appear again. Hope this help.

Thanks. It is now fixed. The important thing that finally solved this was the fact that the keychain had an entry I had not expected. There was an entry for the numerical IP eg as well as its domain name eg Once I had cleared the numerical address, SourceTree would create one for the domain address. There's two months of my life I won't get back. But thanks to Joseph, I have now at least got over the password not saving problem.

0 votes
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 25, 2017

Can you please check your ssh config file once and see if that's fine. And for your kind info, there are new keys on macOS 10.12 to remember password and get the ssh agent use the key -



Thanks for the quick responses guys. I followed technote 2449, added UseKeychain yes and AddKeysToAgent yes. Made no difference.

I verified the agent is running.

I tried the steps to create an identity in ~/.ssh/config for the url I am trying to login to. Again saving the UseKeychain etc but ST still refuses (or is being refused) to place an item in the keychain.

And yes I quit ST and started again after each step of changes to ensure that it was using the latest ssh config

Anything else to try?

Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
May 25, 2017

Can you try restarting the SSH service?

sudo launchctl stop com.openssh.sshd

(it should automatically restart)

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events