首页 > 解决方案 > 为什么我不能从我的私有存储库克隆?

问题描述

我在我的主要开发机器 (Linux) 上有一个git存储库,我定期将它git push连接到远程 SSH 服务器以进行备份。我现在想从 Windows 机器上对该存储库做一些工作。因此,我为 Windows 安装了 Git,设置了 SSH 密钥等。

从 Git Bash,我可以ssh毫无问题地进入我的服务器。但是,这失败了:

$ git clone --config=core.symlinks=true -- user@host:/private/site.git destination
Cloning into 'destination'...
Enter passphrase for key '/c/Users/username/.ssh/id_rsa':
fatal: '/private/site.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.

我确定我提供了正确的用户名、主机名和路径,因为我已经对其进行了两次和三次检查。我已经检查了权限/private/site.git并且他们没问题:我的用户帐户具有读写访问权限。我经常从另一台机器推送到远程存储库没有问题,所以很明显它配置正确。我究竟做错了什么?

标签: windowsgit

解决方案


事实证明,尽管检查了多次,但我提供的主机路径不正确。直到我登录主机检查其他内容时,我才注意到它。哦。


推荐阅读