tags:

views:

47

answers:

3

Can someone point me in the direction I need look so I can configure my GIT client with the password needed for my private key? Every time I push and pull from my repository it asks me for the password for my key. I use command line and have the windows GIT client installed to use ssh.

Thanks for any pointers.

+1  A: 

You have to recreate your default ssh key and use an empty passphrase. Then upload the public part again to the git server.

Without specific products you use on client and server it is a bit difficult to be more specific.

An alternative is to use ssh-agent, but I have no clue if this also works on Windows or if something similar is available.

Peter Tillemans
putty comes with pagent, which is an ssh agent for putty on windows.
Angelo Genovese
+1  A: 

On Unix-like platforms, the fix is straightforward. If ssh-agent isn't running, start it with, for example

$ eval `ssh-agent`

and then add your default identity with

$ ssh-add

If you have an identity somewhere else, run

$ ssh-add /path/to/other/ssh_id

On Windows, a typical setup uses PuTTY as the SSH client, which means you'll want to run Pageant, PuTTY's SSH agent. On Windows, I run a quick batch job out of the Startup group:

@echo off
start /b "C:\Program Files\PuTTY\pageant.exe" "C:\Users\Greg\Greg.ppk"

where Greg.ppk is a key that I created with PuTTYgen.

One more step: tell git to use plink, PuTTY's client for non-interactive connections. Set the environment variable GIT_SSH to

C:\Program Files\PuTTY\plink.exe

assuming that's where PuTTY lives.

If you're still having trouble, GitHub has a page for troubleshooting issues with GitHub and SSH, but please also update your question so we can make this a more helpful resource.

Greg Bacon
+1  A: 

The magic words that you are looking for is "ssh-agent", which is a way of automatically entering the passphrase for an ssh key.

This article from Github gives the lowdown on how to get an ssh-agent running using the msysgit Windows client.

Git on Windows is a difficult experience. You will spend your days wandering the internet finding articles that playfully suggest a series of keypresses that only work properly on Unix.

I'm not saying this to taunt you. Just to prepare you for the fact that this is going to be difficult. In many ways, you'll be better off setting up a Unix VM for whatever it is you are trying to do.

That being said, here are a couple of helpful links:

GitHub's Installing Git on Windows series GitHub's Generating SSH Keys on Windows And some general notes about passphrases

If you don't find what you are looking for on Windows, always check the Github docs first. As far as I have been able to tell, they are the only Windows guides worth a damn.

marshally