Git SSH错误文件编号错误

时间:2014-12-18 14:55:02

标签: git ssh

我正在使用git指南(http://git-scm.com/book/en/v2)设置git服务器。 所以我在Ubuntu服务器上创建了一个用户git,并将我的pc的ssh密钥放在authorized_keys文件中。

我在/repos/test/test.git的git帐户上做了一个回购 当我尝试使用

从Windows PC克隆时
git clone git@196.168.0.114:/repos/test/test.git

它给了我这个:

Cloning into 'test'...
ssh: connect to host 196.168.0.114 port 22: Bad file number
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我在git帐户上也有密码

.ssh chmod 700由git帐户

通过git帐户

authorized_keys chmod 600

1 个答案:

答案 0 :(得分:0)

来自GitHub documentation

  

此错误通常表示您无法连接到服务器。这通常是由防火墙和代理服务器引起的。

请检查Windows和Linux客户端上的防火墙设置。

尝试ssh -vvv git@196.168.0.114

如果你在输出中看到这个:

 [196.168.0.114] port 22. debug1: connect to address 196.168.0.114 port 22: Attempt to connect timed out without establishing a connection

然后在两台计算机内部或两者之间有一个防火墙,可以吞下数据包。