我在LINUX上安装了gitlab(RHEL 6.7)。在通过ssh克隆repo时,它一直在寻找git的密码,但是使用http工作正常:
$ git clone http://MGJV67@il06epclin1.am.mot-solutions.com/MGJV67/NewPROJ.git
Cloning into 'NewPROJ'...
warning: You appear to have cloned an empty repository.
mgjv67@mgjv67-430 MINGW64 /c/TCS/Gitlab/NewPROJ (master)
$ git clone git@il06epclin1.am.mot-solutions.com:MGJV67/NewPROJ.git
Cloning into 'NewPROJ'...
git@il06epclin1.am.mot-solutions.com's password:
Permission denied, please try again.
Permission denied (publickey,gssapi-keyex,gssapi-with-mic,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
答案 0 :(得分:0)
虽然您可以通过http匿名克隆,但您只能通过具有有效SSH身份的SSH进行克隆。 创建SSH密钥并将公钥添加到您的Gitlab用户帐户,或者将其添加为项目的部署密钥,以防您只需要只读访问权限。