昨天,今天,明天,每天的每天,你是否都多懂得一点点...

星期一, 十一月 11, 2013

Add git ssh key on windows

Two ways:

The first way

1. Run ssh-keygen under the git bash. (It will put the generated file in the $Home folder)。
2. cat the pub key in the home folder and add it to the git website.
3. Done (the git command should be run under the bash)

The second way

1. Use PUTTYGEN.EXE to generate the key.
2. Add the pub key to the website (copy the string from PUTTYGEN).
3. Add the private key to PAGEANT
4. set GIT_SSH to point to plink.exe
5. Done. (the git command should be run under the cmd.exe)


I encountered a problem which cost me a lot of time to found out. The git url in the config file is incorrect. The reason should be that the host definition file was deleted.

I thought that it was caused by the key. But it's not.


--
Feng

没有评论:

其它博客地址

此博客的同步博客地址: http://fengnz.wordpress.com
这里进入我的MSN SPACE.