正如标题所述,即使 ssh 似乎可以工作,我也无法从 Gitlab 6 服务器克隆存储库。
当尝试克隆时,它看起来像这样:
git clone ssh://[email protected] /cdn-cgi/l/email-protection:1337/project/repository.git
Cloning into 'repository'...
Access denied.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
在项目中,我有“开发人员”的角色,它应该有权克隆存储库?
我还检查了我的 SSH 公钥是否正常工作
ssh [email protected] /cdn-cgi/l/email-protection -p 1337 -T
Welcome to GitLab, Anonymous!
更令我恼火的是,对于我的一个朋友来说,似乎一切都运转良好。
Edit:这里所说的问题的主要指标是来自 SSH 测试的问候语。在工作环境中,它应该用您的名字来问候您,而不是匿名!
尝试类似 scp 的语法:
git clone ssh://[email protected] /cdn-cgi/l/email-protection:1337:project/repository.git
这迫使use of ~/.ssh/config https://stackoverflow.com/q/32958482/6309实际上,这意味着 url 可以简化为gitlab:project/repositoriy.git
.
但结果是gitlab服务器的ssh key问题~gitlab/.ssh/authorized_keys
(有点像在问题 4730 https://github.com/gitlabhq/gitlabhq/issues/4730#issuecomment-85232416).
The OP Gelix https://stackoverflow.com/users/2708038/felix证实在评论中 https://stackoverflow.com/questions/33837103/gitlab-cant-clone-repository-even-though-ssh-works/33837230?noredirect=1#comment55450558_33837230:
我从 Gitlab 手动删除了密钥authorized_keys
,在 Gitlab 上阅读。现在一切都很好。
带有 SSH 测试的消息现在也Welcome to GitLab, Felix *****
!
(代替Welcome to GitLab, Anonymous!
)
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)