Search code examples
gitgitlabclone

How do I clone from GitLab?


When I try to clone a project from GitLab it says "Failed to authenticate". I typed my username and password correctly(I've tried it few times), configured my SSH key. I've tried my access token instead of my password and still unable to clone. I'm using HTTPS clone


Solution

  • If you have configure your SSH key, make sure:

    • said ssh key does authenticate your properly: ssh -Tv git@gitlab.com

    • to use an SSH URL when cloning your GitLab repository

      git clone git@gitlab.com:me/myRepo
      

    configured my SSH key. I'm using HTTPS clone

    Then the SSH key does not matter.

    Check your git config --global credential.helper: if set, it might have cached the wrong credentials.