无法克隆 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.
我的设置
- 在 git 用户
- Ubuntu 20.04
我试过了
- gitolite3 apt-package
- gitolite github 版本
- 编辑 ~/.ssh/conf(来自 8 年前的堆栈溢出解决方案)
- 从同一台机器访问,但不同的用户
- 从我的主电脑(不同网络)访问
我read/watched
- YouTube 安装(自 2013 年起)
- 来自多个不同网站的解决方案
- 正在应用来自 gitolite
的 ssh 部分
- ...以及几乎来自 gitolite
的全部文档
什么我discovered/think
- 例如,keydir 在我的安装中甚至不存在
- 更改 ~/.ssh/config 没有做任何事情
- 大多数以前的解决方案都已经过时了
我从今天开始才开始使用 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.
在“成功”安装 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.
我的设置
- 在 git 用户
- Ubuntu 20.04
我试过了
- gitolite3 apt-package
- gitolite github 版本
- 编辑 ~/.ssh/conf(来自 8 年前的堆栈溢出解决方案)
- 从同一台机器访问,但不同的用户
- 从我的主电脑(不同网络)访问
我read/watched
- YouTube 安装(自 2013 年起)
- 来自多个不同网站的解决方案
- 正在应用来自 gitolite 的 ssh 部分
- ...以及几乎来自 gitolite 的全部文档
什么我discovered/think
- 例如,keydir 在我的安装中甚至不存在
- 更改 ~/.ssh/config 没有做任何事情
- 大多数以前的解决方案都已经过时了
我从今天开始才开始使用 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 inrepositories/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.