0

我是 moovweb 的新手。使用 gitbash 登录 moov 服务器。登录后,我尝试从 gitbash(以管理员身份)克隆在 moov 网站上成功创建的项目。我收到以下错误

$git clone moov@git.moovweb.com:bharath2k5/wikipedia.git
ssh:connect to host git.moovweb.com port 443: Bad file number
fatal:could not read from remote repository.

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

这也是我的 .ssh/config。

Host git.moovweb.com
    IdentityFile ~/.ssh/id_rsa
     PreferredAuthentications publickey 
     Port 443

谢谢你的帮助。

4

1 回答 1

0

看起来您的计算机无法连接到 moovweb git 服务器 ( git.moovweb.com),因此它甚至没有进入身份验证步骤。我注意到您的 ssh 配置中有一条规则使用端口 443 而不是 22。您的网络是否阻止端口 22 访问?即使进行了配置,git 仍然可能使用端口 22。您可以通过运行以下命令进行检查:

最好的检查方法是在 git bash 中运行以下命令:

$ ssh -vv moov@git.moovweb.com

这应该会给你很多信息,包括 ssh 正在尝试使用哪个端口。

无论如何,您可以通过更改用于克隆项目的 URI 来强制 git 在特定项目上使用端口 443。尝试以下方法,看看它是否有效:

$ git clone ssh://moov@git.moovweb.com:443/bharath2k5/wikipedia.git

如果可行,则似乎其中的Port配置.ssh/config似乎不适用于 git 操作。

于 2014-02-23T09:17:08.163 回答