Search code examples
gitgithubgitlabclone

i cannot Clone a Gitlab repository when i connected my github account to gitlab


Junior dev here!

I want to do a normal HTTPS clone to my PC. Using gitlab and git bash.. doing git clone+ https.. Next step is asking me my username and password from gitlab.. Its seems super easy but i created my Gitlab account throught my github account so now imposible to find my username and password.

I already tried git config user.name.
My github username + password
Many other possible combinations of usernames and passwords
like come on it should be so dificult !


- Do you have any hint to find my username + password??
Thanks a lot


Solution

  • Whenever you create an account by signing in with another service, the system creates a random password. This is true for almost any site, such as when you "sign in" somewhere with Google.

    For git authentication using HTTPS, there are two different things you can enter as a "password":

    1. Your GitLab user account password. Since you don't know your password, then you should reset your password first.
    2. A personal access token. This is required if you have multi-factor authentication (2FA) turned on in GitLab (which is possible to do even with signing in through GitHub).