I'm using SourceTree with my native system Git, that have all SSH keys setup. Running git push / git pull from the terminal works fine, but using the SourceTree buttons it prompts for a git user.
My question is really how to get this working...
Screenshot 2015-04-01 10.42.22.png
filip➜~/GitMigration/test(master)» git remote -v
origin git@git.company.com:main/devops.git (fetch)
filip➜~/GitMigration/test(master)» git push
Counting objects: 6, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (6/6), 943 bytes | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
To git@git.company.com:devops/devops.git
27d45ef..f834554 master -> master
filip➜~/GitMigration/test(master)» which git
/usr/local/bin/git
It prompts for the git user password, I press cancel trice:
git -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree push -v --tags origin refs/heads/master:refs/heads/master
Pushing to git@git.company.com:main/devops.git
2015-04-01 10:58:28.811 SourceTreeLogin[1133:2214511] Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could not be found in the keychain.
User cancelled password prompt.2015-04-01 10:58:30.580 SourceTreeLogin[1133:2214511] User cancelled password prompt.
Permission denied, please try again.
2015-04-01 10:58:30.656 SourceTreeLogin[1134:2214552] Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could not be found in the keychain.
User cancelled password prompt.2015-04-01 10:58:32.450 SourceTreeLogin[1134:2214552] User cancelled password prompt.
Permission denied, please try again.
2015-04-01 10:58:32.510 SourceTreeLogin[1146:2214673] Error (internetKeychainItemForServer:withUsername:path:port:protocol:) - The specified item could not be found in the keychain.
User cancelled password prompt.2015-04-01 10:58:33.601 SourceTreeLogin[1146:2214673] User cancelled password prompt.
Permission denied (publickey,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Completed with errors, see above
git version 2.3.2
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
SourceTree version 2.0.5.2 (2.0.5.2)
I had a similar issue and needed to provide my password for my SSH key (id_rsa). The prompt was not clear for me, but that did resolve it.
Basically Source tree has a major problem processing accounts if you have 2 factor or use things like app passwords I logged a question previously - and was told how to to use app passwords - but the problem is that Sourcetree is has a major bug which they aren't fixing.
I am moving to an alternative git client till they add proper support for 2 factor or improve their implementation to remember passwords.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I've tried with this configuration, but it still prompts for git user
filip➜~/GitMigration/devops(master)» git remote -v
origin ssh://git@git.company.com:main/devops.git (fetch)
origin ssh://git@git.company.com:main/devops.git (push)
If I use this:
filip➜~/GitMigration/devops(master)» git remote -v
origin ssh://git.company.com:main/devops.git (fetch)
origin ssh://git.company.com:main/devops.git (push)
We use GitLab, and it explicitly tell me to use:
git@git.company.com:main/devops.git
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I always use git@ when doing SSH. Have you tried putting ssh:// into the URL, though?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
"I don't handle ssh://" it says.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you change the remote url to
someUserName@git.company.com:devops/devops.git
it should not ask you for username anymore.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.