【问题标题】:git clone access error specifying a destination directory指定目标目录的 git clone 访问错误
【发布时间】: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,它可以正常工作。

【问题讨论】:

    标签: git bundler


    【解决方案1】:

    我认为您没有正确指定目标目录的路径,这就是它显示该错误的原因。相反,尝试进入目标目录,打开终端并尝试 git clone 'git@bitbucket.org:org/repo.git' \ --bare --no-hardlinks --quiet

    【讨论】:

      猜你喜欢
      • 2014-07-07
      • 1970-01-01
      • 2021-02-22
      • 1970-01-01
      • 2012-03-11
      • 2012-05-25
      • 1970-01-01
      • 2015-09-04
      • 2013-07-25
      相关资源
      最近更新 更多