【发布时间】:2016-12-16 14:48:31
【问题描述】:
我正在尝试通过 ssh 在 Mac 上克隆一个 git 存储库。 到目前为止我遵循的步骤
- 创建
id_rsa.pub并与管理员共享以供访问。文件位于/Users/admin/.ssh -
在
/Users/admin/.ssh创建了一个config文件。文件内容是Host MY_DOMAIN IdentityFile ~/.ssh/id_rsa IdentitiesOnly yes -
我在终端上运行以下命令
git clone git@MY_DOMAIN:android.git git clone git@MY_DOMAIN:android
我得到的回应是
Cloning into 'android'...
Enter passphrase for key '/Users/admin/.ssh/id_rsa':
Connection to MY_DOMAIN closed by remote host.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
我有点困惑,如果我遵循正确的方法或者访问权限是否有任何问题。
【问题讨论】:
-
请出示gitolite配置。
标签: git ssh git-clone gitolite