无法克隆 gitolite 存储库并导致致命错误

Failed to clone gitolite repo and lead to fatal error

在“成功”安装 gitolite(多种方式:apt-package,github source),但它总是给出相同的错误。

$ git clone git@******:gitolite-admin
Cloning into 'gitolite-admin'...
git@******'s password:
fatal: 'gitolite-admin' 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.

我的设置


我试过了


我read/watched


什么我discovered/think

我从今天开始才开始使用 gitolite,但已经感到非常疲惫我愿意接受任何提供的解决方案,如果可以请帮助我:)

首先在 Gitolite 服务器上检查你的 ~git/.ssh/authorized_keys:如果你想克隆一个 gitolite 管理的存储库(包括主要的 gitolite-admin 一个),你的 public 键应该是:

  • 在那个 ~git/.ssh/authorized_keys 文件中列出,
  • 前面是强制命令 command="[path]/gitolite-shell(正如我在“How do programs like gitolite work?”中详述的)

否则,假设您的 public 密钥已注册(不适用于 gitolite,仅用于常规交互式 SSH 会话),那么您的克隆将是:

git clone git@******:/full/path/to/gitolite-admin

OP justsomexanda adds :

I relinked my pub- and priv-keys.
After rechecking them I could clone "testing" but not "gitolite-admin" so I looked closer and saw that in repositories/gitolite-admins/gl-conf there was the name of my key (which I called 'myKey') but it was not the same identities which I logged in (named 'alex').
I changed the name in the conf and it worked.

So in summary: just check you name the keys right and you are using the correct identity.