我是 gitlab 和 CI 的新手,所以我有很多问题,但其中一些是通过 google、SO、git mans 解决的,但不是最后一个......
我无法通过 ssh 克隆 repo =(
如果我尝试通过 http 克隆 repo:
lesha@lesha-SeoTeam:/var/www$ git clone http://gitlab.vbox/root/virtualboxgitlab.git
Cloning into 'virtualboxgitlab'...
Username for 'http://gitlab.vbox': root
Password for 'http://root@gitlab.vbox':
warning: You appear to have cloned an empty repository.
没关系!
但是通过 ssh ...
lesha@lesha-SeoTeam:/var/www$ git clone git@gitlab.vbox:root/virtualboxgitlab.git
Cloning into virtualbox 'gitlab'
git@gitlab.vbox's password:<br />
它提示我在安装过程中没有创建的 git 密码(就像我在 man 中一样)
rsa keys
我通过 gitlab 的网络添加了我的密钥(到帐户根,实际上我没有创建任何其他帐户)
我还通过“cat my_rsa.pub >> authorized_keys”添加了密钥
我在这里读了几篇关于 ssh 问题的帖子,但大多数都安装了 gitolite
我安装了没有 gitolite 的 gitlab 5.3(如手册中所示),我应该这样做吗?
我也试过ssh -vT git@gitlab.vbox
了,它输出:
....
debug1: Server host key: ECDSA 48:83:ba:b3:37:72:a0:dc:ca:2c:a3:b8:78:a1:c4:ad
debug1: Host 'gitlab.vbox' is known and matches the ECDSA host key.
debug1: Found key in /home/lesha/.ssh/known_hosts:2
debug1: ssh_ecdsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: Roaming not allowed by server
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/lesha/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/lesha/.ssh/id_dsa
debug1: Trying private key: /home/lesha/.ssh/id_ecdsa
debug1: Next authentication method: password
git@gitlab.vbox's password:
root@seotm-server:/home/git/.ssh# ls -l
итого 4
-rw------- 1 git git 922 Июл 18 21:05 authorized_keys
环境:debian 7,nginx + 乘客,gitlab 5.3,ruby 2.0.0p247,没有 gitolite,puma 对抗独角兽
请帮忙!=)我被困住了......
一些补充(20.07.2013):
我在手动安装中创建了用户 git
sudo adduser --disabled-login --gecos 'GitLab' git
第二天,我试图简单地通过useradd
命令杀死 git 并重新添加,之后我的键正在工作,但我仍然不高兴,因为:
lesha@lesha-SeoTeam:/var/www$ git clone git@gitlab.vbox:root/virtualboxgitlab.git
Cloning into 'virtualboxgitlab'...
fatal: 'root/virtualboxgitlab.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
和 http 和以前一样工作:
lesha@lesha-SeoTeam:/var/www$ git clone http://gitlab.vbox/root/virtualboxgitlab.git
Cloning into 'virtualboxgitlab'...
Username for 'http://gitlab.vbox': root
Password for 'http://root@gitlab.vbox':
warning: You appear to have cloned an empty repository.
所以,现在我没有身份验证问题,但有另一个问题。
您将如何从那里解决此问题?