gpt4 book ai didi

使用 Cygwin+SSH 访问 Git-server 存储库

转载 作者:行者123 更新时间:2023-12-02 14:09:40 25 4
gpt4 key购买 nike

我有一台托管存储库的 Windows 服务器计算机。我在上面创建了一个裸存储库,可以使用文件协议(protocol)和以下命令访问它。

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

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

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

我可以使用 成功登录服务器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,但这也无济于事。我不确定我到底哪里出错了。

最佳答案

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

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

更多详情请引用 this .

关于使用 Cygwin+SSH 访问 Git-server 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23008964/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com