ssh authentication still prompts for password

Carl Wainwright June 1, 2016

I'm have setup SourceTree to connect to my Git repo using SSH without password. My public key has been successfully stored on the Git server.

However, I'm repeatedly getting prompted for a password to authenticate the user 'git'. I can see on the Git server that my key exchange is successful.

Jun  1 14:16:19 Ptk-Controller sshd[28381]: Accepted publickey for git from 172.28.1.42 port 53452 ssh2: RSA 22:1c:2d:43:1a:30:ba:73:8b:f0:74:c1:12:69:cc:58
Jun  1 14:24:23 Ptk-Controller sshd[29046]: Accepted publickey for git from 172.28.1.42 port 53758 ssh2: RSA 22:1c:2d:43:1a:30:ba:73:8b:f0:74:c1:12:69:cc:58
Jun  1 14:26:43 Ptk-Controller sshd[29142]: Accepted publickey for git from 172.28.1.42 port 53884 ssh2: RSA 22:1c:2d:43:1a:30:ba:73:8b:f0:74:c1:12:69:cc:58
Jun  1 14:32:07 Ptk-Controller sshd[29630]: Accepted publickey for git from 172.28.1.42 port 54018 ssh2: RSA 22:1c:2d:43:1a:30:ba:73:8b:f0:74:c1:12:69:cc:58
Jun  1 14:36:03 Ptk-Controller sshd[29853]: Accepted publickey for git from  172.28.1.42 port 54171 ssh2: RSA 22:1c:2d:43:1a:30:ba:73:8b:f0:74:c1:12:69:cc:58

My repo is configured as git@phantom.ipaccess.com:people/cw1/ansible.git (I did read somewhere to include ssh://, but this threw up different issues).

As things are I can successfully push/clone etc using SourceTree.

Any ideas why the password prompt is happening?

5 answers

0 votes
marcin_piela July 27, 2018

I had a very similar problem on OS X. Remote accessed through SSH (url: git@...). Authentication: private / public key pair. Each fetch or pull caused prompt for password for user "git". When I entered the password to my private key it went on. Problem was SourceTree never respected the "store password in keychain" option and asked for password each time I wanted to do a fetch or pull (pull caused two prompts!).

Today I found a solution to that problem: 

ssh-add ~/.ssh/id_rsa 

Unfortunately this command must be issued after each restart and it's interactive because you have to input the password to your private key.

0 votes
h tsch October 27, 2016

I am having same issue with source tree 2.3.1 running on OS X 10.11.6.  I have generated ssh key so I can run command line git (push, clone, branch, pull, etc) with no issues.  I have reinstalled sourcetree after using app uninstall to completely remove all the dependency directories.  Then I tried renaming the Keychains directory and then reboot so it would not be involved.  Best I can do is clone a local repository via command line and then I can add the cloned local repository to source tree and it looks fine.  As soon as I try pushing a modification via sourcetree it complains.  After moving Keychains directory back again I have searched for sourcetree, bitbucket,  Atlasssian or anything related and find nothing.  I don't know what else to try.  window keeps popping up asking for 'Password Required ... for user xx on host yyy ... with a check box to store password in keychain.

cam tullos January 9, 2018

It's been 2 years since this was last posted, and I get the same problem on Mac. 

0 votes
Carl Wainwright June 8, 2016

I've checked with a colleague who is running sourcetree on a Mac and he does not get this authentication prompt.

0 votes
Carl Wainwright June 1, 2016

No, just a passphrase and pageant is handling that aspect of things. I can safely connect to the git server using my public key/passphrase with putty.

0 votes
Seth
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 1, 2016

Is your private key password protected?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events