【发布时间】:2020-03-05 10:51:24
【问题描述】:
我正在尝试克隆(实际上,Bundler 是)一个指定目标目录的存储库:
git clone 'git@bitbucket.org:org/repo.git' \
"/home/maurizio/.asdf/installs/ruby/2.3.8/lib/ruby/gems/2.3.0/cache/bundler/git/repo-34ec47fae53fea1f1a83aa12476ce783204fcfef" \
--bare --no-hardlinks --quiet
此命令失败并显示以下错误消息:
Forbidden
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
所以我尝试手动运行命令,我得到了同样的错误,除非我删除了目标目录:
git clone 'git@bitbucket.org:org/repo.git' \
--bare --no-hardlinks --quiet
作为一种解决方法,我手动克隆它并在克隆后移动它。
我的设置是默认设置;我只是有这个项目的备用SSH密钥,保存为~/.ssh/id_rsa_org,它可以正常工作。
【问题讨论】: