【问题标题】:Git-server repository to be accessed with Cygwin+SSH使用 Cygwin+SSH 访问 Git-server 存储库
【发布时间】:2014-07-07 12:43:52
【问题描述】:

我有一台托管存储库的 Windows 服务器计算机。我在其上创建了一个裸存储库,可通过以下命令使用文件协议访问该存储库。

git clone //my-server/git/test.git

这一切对我来说都很好,并且存储库在我的本地机器上成功克隆。

现在我必须通过 ssh 访问这个存储库。为此,我在服务器上安装了 Cygwin 并使用 ssh-host-config 命令配置了 ssh-host。我还在 /etc/passwd 中添加了一个本地 Windows 用户。

我可以使用 ssh 成功登录服务器,并从我的本地机器上玩服务器。

但是,我们尝试使用命令git clone ssh://my-server/git/test.git。我在命令提示符下看到以下错误。

fatal: '/git/test.git' does not appear to be a git repository
fatal: Could not read from remote repository.

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

我什至尝试安装 Cygwin 的 Git,但这也无济于事。我不确定我到底哪里出错了。

【问题讨论】:

    标签: git ssh cygwin


    【解决方案1】:

    据我所知,您的 SSH URL 不正确。

    试试 git clone ssh://user@server/git/test.git 或 git clone user@server:git/git.test。

    更多详情请咨询this

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-03-12
      • 1970-01-01
      • 2013-03-22
      • 1970-01-01
      • 2017-04-21
      • 2017-08-07
      • 1970-01-01
      相关资源
      最近更新 更多