【问题标题】:Gitosis cloning out on non-default portGitosis 在非默认端口上克隆
【发布时间】:2012-02-17 13:57:04
【问题描述】:

当 gitos-admin 与

git clone ssh://gitosis@192.168.1.1:gitosis-admin.git

我无法连接,因为 ssh 连接到端口 22,而我的 ssh 在 2211 上运行。所以,我在互联网上搜索了解决方案。它应该像将端口添加到我的 .ssh/config 文件一样简单。我将以下内容添加到文件中(我愿意创建)

Host bml
HostName 192.168.1.1
Port 2211

执行时:

git clone ssh://gitosis@bml:gitosis-admin.git

我收到以下错误:

Cloning into 'gitosis-admin'... ssh: connect to host port 22: Bad file number fatal: The remote end hung up unexpectedly

这表明我的配置文件无效或者我的配置文件没有被使用。

所以...我用一个不存在的主机对其进行了测试

git clone ssh://gitosis@bmlsomething:gitosis-admin.git

导致与之前相同的错误

Cloning into 'gitosis-admin'... ssh: connect to host port 22: Bad file number fatal: The remote end hung up unexpectedly

这表明未使用配置文件(okey 仍可能是无效文件,但预计至少会出现不同的错误)。

我该如何解决这个问题?顺便说一句,我在 Windows 7 上:-s。

【问题讨论】:

    标签: windows git ssh gitosis


    【解决方案1】:

    根据thisgit clone ssh://user@host:port/repository 应该可以工作。

    据我所知,Windows 不使用~/.ssh/config

    编辑:here 也讨论了这个问题。

    【讨论】:

      猜你喜欢
      • 2018-06-22
      • 1970-01-01
      • 1970-01-01
      • 2010-11-20
      • 1970-01-01
      • 2023-03-08
      • 1970-01-01
      • 2015-07-30
      • 1970-01-01
      相关资源
      最近更新 更多