【问题标题】:Gitlab: While cloning a repo via ssh it keeps asking for passwordGitlab:通过 ssh 克隆 repo 时,它不断要求输入密码
【发布时间】:2017-09-30 13:57:20
【问题描述】:

我已经在 LINUX(RHEL 6.7) 上安装了 gitlab。通过 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.

【问题讨论】:

    标签: linux git gitlab


    【解决方案1】:

    虽然您可以通过 http 匿名克隆,但您只能通过具有有效 SSH 身份的 SSH 进行克隆。 创建一个 SSH 密钥并将公钥添加到您的 Gitlab 用户帐户,或者将其添加为您的项目的部署密钥,以防您只需要只读访问权限。

    【讨论】:

    • 我也上传了 ssh 密钥,但它仍然要求输入密码。
    猜你喜欢
    • 2019-03-07
    • 1970-01-01
    • 1970-01-01
    • 2013-07-18
    • 2019-01-25
    • 2014-07-30
    • 1970-01-01
    • 1970-01-01
    • 2021-11-23
    相关资源
    最近更新 更多