Gitlab can't clone repository even though ssh works

后端 未结 2 998
借酒劲吻你
借酒劲吻你 2021-02-07 12:43

As the title states, I can\'t clone a repository from a Gitlab 6 server even though the ssh seems to work.

When trying to clone, it looks like this:

git          


        
相关标签:
2条回答
  • 2021-02-07 13:09

    I had the same problem recently with my private GitLab-CE hosted server. Reconfiguring the GitLab saved me. I have tried editing the local config file and adding the host also, but it didn't work. This worked for me.

    sudo gitlab-ctl reconfigure
    
    0 讨论(0)
  • 2021-02-07 13:11

    Try the scp-like syntax:

    git clone ssh://git@domain.de:1337:project/repository.git
    

    That forces the use of ~/.ssh/config actually, which means the url can be simplified to gitlab:project/repositoriy.git.

    But it turned out to be an ssh key issue in the gitlab server ~gitlab/.ssh/authorized_keys (a bit like in issue 4730).
    The OP Gelix confirms in the comments:

    I removed my key from Gitlab, manually from authorized_keys, readded it on Gitlab. Everything fine now.
    Message with SSH Test is now also Welcome to GitLab, Felix *****!

    (instead of Welcome to GitLab, Anonymous!)

    0 讨论(0)
提交回复
热议问题