开发者

establishing a Github ssh connection - is this the right way

开发者 https://www.devze.com 2023-03-21 01:09 出处:网络
I was following the help.github.com/win-set-up-git/ process and kept getting the Host key verification failed message with no clues when testing the ssh link. I\'m working on Windows XP, with msysgit

I was following the help.github.com/win-set-up-git/ process and kept getting the Host key verification failed message with no clues when testing the ssh link. I'm working on Windows XP, with msysgit from the recent Git version Git-1.7.3.1-preview20101002.

I didn't find the Github support pages that helpful (not having used unix in anger in 30 yrs), so after a good bit of googling I got to this. I'd welcome comments and suggestions to make it better.

I found various refs to nmap, for "pinging" the port. I downloaded the windows version and used nmap -p 22 github.com (from a DOS window) to establish I didn't have a firewall or router issue.

When generating your ssh key you must change the unix file permission of your private key file with chmod 600 ~/.ssh/* - it's ignored if it doesn't have those permissions!

The main trick I discovered was adding an option in the ssh test line ss开发者_如何学编程h -vT -o "StrictHostKeyChecking no" git@github.com. This resolves a windows/tty issue with the github key storage prompts.

While this worked for me, have I introduced any issues?


You shouldn't need those ssh options, and Git-1.7.3.1-preview20101002 isn't recent.

Try it with the latest PortableGit-1.7.6-preview20110709.7z: unzip and add the bin directory to your PATH.

The key for those MinGW-based product to work is to define an environment variable called HOME, which isn't defined by default on Windows.
You can set that HOME to whatever directory you want (C:\Users\Me is usually a good choice), and then you will open a bash Git session in which you will execute the ssh commands.

0

精彩评论

暂无评论...
验证码 换一张
取 消