MSysGit和sshconfiguration。 失踪

1)运行Git Bash(C:\ Program Files(x86)\ Git \ bin \ sh.exe –login)

$ ssh -v git@github.com OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug1: Reading configuration data /c/Users/Alexander Fedorov/.ssh/config debug1: Applying options for github.com debug1: Connecting to github.com [207.97.227.239] port 22. debug1: Connection established. ... Hi xpoft! You've successfully authenticated, but GitHub does not provide shell access. ... 

好的! sshconfiguration阅读不错。

2)从cmd.exe运行

 C:\Users\Alexander Fedorov>ssh.exe -v git@github.com OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007 debug1: Connecting to github.com [207.97.227.239] port 22. ... debug1: No more authentication methods to try. Permission denied (publickey). 

拿去。 sshconfiguration文件丢失…

如何…如何从ssh.exe读configuration?

Solutions Collecting From Web of "MSysGit和sshconfiguration。 失踪"

可能缺少的是用户环境变量HOME

如果从使用git-cmd.bat打包的git-cmd.bat脚本启动DOS会话,应该定义它,并且应该看到%HOME%\.ssh\id_rsa(.pub)

但是从任何其他的DOS窗口,默认情况下都没有定义HOMEHOMEPATHUSERPROFILE )。
另请参阅“ 修复msysGit便携式$ HOME位置 ”(但您不应该需要使用最新版本的msysgit及其git-cmd.bat脚本的解决方法)