如何连接服务器到git?

时间:2012-03-22 07:20:05

标签: git

我需要连接到服务器git。

http://help.github.com/win-set-up-git/ 我尽一切努力,4点,我将ssh密钥添加到服务器界面。但是5点呢?

我有可用的存储库nick@source.server.com:title.git

但如果我输入链接,我会收到错误

ssh: source.server.com:title.git: no address associated with name

1 个答案:

答案 0 :(得分:2)

这意味着ssh没有连接到source.server.com(名称没有解析成ip地址),所以ssh正在寻找一个%HOME%\.ssh\config文件,在其中可以看到它的实际主机名在看source.server.com时应该使用 请参阅config file here的示例。

(注意:Windows上没有默认定义HOME,所以不要忘记定义它)

GitHub帮助页面上的第5点是关于测试与GitHub的ssh连接,而不是测试服务器。

ssh -T git@github.com