我的git bash不适用于github

时间:2012-06-11 07:41:30

标签: github

我在我的Windows 7上成功安装了git bash,它工作了好几天。但是在最近几天我总是得到同样的错误:

Disconnected: No supported authentication methods available. 

运行命令“ssh git@github.com”,我收到了一条成功消息:

Hi xxxx, You've successfuly authenticated. but Github does not provide shell access.

我检查了.profile,GIT_SSH设置为ssh.exe与git bash一起出现如下:

GIT_SSH = "/d/progra~1/git/bin/ssh.exe"

但是,我注意到每次打开git bash时都会出现错误信息:

sh.exe": GIT_SSH: command not found

结果,我看到TortoisePlink.exe仍在使用中。

感谢任何建议!

1 个答案:

答案 0 :(得分:0)

解决方法是使用https地址用于GitHub仓库(https://github.com/username/yourRepo),并将您的GitHub凭据放在%HOME%/_netrc文件中:请参阅“Syncing with github”。

另一种选择是检查http://windows.github.com,看看该设置是否有效 它将创建自己的ssh公钥/私钥,并在您的帐户中注册。

请注意this answers建议:

GIT_SSH="/usr/bin/ssh.exe"

(即类似unix的路径)