4

I would like to use the DOS command line to enter the command: git clone "git_path.git" myDir It asks me to enter a password which I would like to avoid. I usually use TortoiseGit to do all git related operations. I would like to setup cruisecontrol using ant with a custom git task. Therefore I need to perform git clone on the command line in Windows 7. But it only works using git bash and not DOS.

According to other forum entries, I tried to convert the key with puttyGen and put the file id_rsa in c:/Users/myName/.ssh I also added an authorized_keys file but it still asks for a password. Any ideas?

Thanks

nickgrim
  • 4,466
  • 1
  • 19
  • 28
Sandy
  • 41
  • 1
  • 2

1 Answers1

1

I'd guess that the problem is that git bash knows to look for a public-key in your home directory, but the DOS box doesn't.

There are, I think, a few options available to you (none of which I've tried, since I don't have a Windows box to hand):

  • Make sure that you're running pageant (I assume you're not, since you didn't say you were) and that you've got that private key loaded.
  • Set up a connection in PuTTY named after your remote-server and specifying the private-key in the settings.
  • Set the GIT_SSH environment-variable to something that specifies the location of the private-key - I'd guess the contents should probably be something like plink -i c:/Users/myName/.ssh.
nickgrim
  • 4,466
  • 1
  • 19
  • 28
  • Thanks, but it still doesn't work. I installed pageant, opened Putty, entered the remote address and added the private key to the session. But it still wants a username and password to login. Isn't the private key enough? I didn't really get what you meant with point 3: how does that work with plink? Thanks! – Sandy Mar 14 '11 at 23:17
  • The third line is kind of the whole point of it. Nickgrim's instructions will have git using putty with pageant to handle its SSH connections, which can use the private key. – Falcon Momot May 24 '13 at 09:31