Reputation: 8742
I have a webserver with gitolite installed and where i login using my ssh key. Normally i just use git on the server itself using the command line but for a new project i need to clone a repo on my windows pc and i would like to use SmartGit for this.
But i've spend several hours already just to clone the repo via Smartgit. As remote Git i use the url i normally would use on the server: me@my-server:the-repo then after a while i get a dialogue box 'SSH Authentication' and i select my private key, as i would do for pagent, and put in my Passphrase. But when i click login it just tries to connect for a while and then shows me the 'SSH Authentication' dialogue box again. No error message or anything.
I tried the clone the repo with the same data via command line and that works just fine. So is there something i'm missing?
Upvotes: 18
Views: 44101
Reputation: 7641
If you're using SmartGit on MacOS X, this problem causes an unexpected dialog to be displayed in the Finder:
"SSH - Enter passphrase for key '/Users/username/.ssh/id_rsa':"
It pops up when SmartGit is launched, and it looks like this:
It's odd and confusing how it looks like a Finder dialog, with no reference at all to SmartGit. It's usually caused by the SSH key password not being stored in the Keychain Access app. That's where SmartGit will look for it. You'll need to add it in there, like this:
ssh-add --apple-use-keychain ~/.ssh/id_rsa (assuming id_rsa is your private key file)
ssh-add -K ~/.ssh/id_rsa (assuming id_rsa is your private key file)
The above commands are usually needed after restarting your computer. See also these guides:
Upvotes: 5
Reputation: 2744
ssh-keygen -t rsa -b 4096 -m PEM
(add the public key to your git host)
(In my case, I had to remove my local project and then clone it from smargit, i wasn't able to make it work with an existing local project, smartgit always told me the private key (id_rsa) was wrong or the passphrase was wrong, It took me one day to succeed, i hate so much smartgit!!!)
Upvotes: 0
Reputation: 3667
If you want to use putty as ssh client, please follow the below steps:
Use System SSH
Client
After that, please use pageant and load the private key
Upvotes: 6
Reputation: 521
Yes, that's it!
I just want to go in details to help the ones starting from scratch:
on windows you can do the following procedure:
Upvotes: 13
Reputation: 8742
Needed to save my ssh private key as an OpenSSH key in PuTTYgen because SmartGit only understand that format.
Upvotes: 25
Reputation: 51
I found it easier to change SmartGit | Preference | Commands | Executables to use "C:\Program Files (x86)\Git\bin\git.exe", and then set GIT_SSH=plink in the system env.
Upvotes: 4