GitLab remote: Access denied with GitLab via GitHub authorization


Unlike this post im authorized in gitLab via GitHub

I am authorized in gitLab via gitHub and I trying to clone project with URL.

So when I trying to do steps below for a new project I am prompted to enter my gitlab account login and password

git init
git remote add origin
git fetch

after data is entered for both gitLab and GitHub I get the following error

Access denied. The provided password or token is incorrect or your account has 2FA enabled and you must use a personal access token
instead of a password. See
fatal: Authentication failed for ‘’

I tried to change rights from developer to maintainer and I still get this problem


I don’t see that you clarified if you have a 2FA enabled or not… But I’ll assume that you do for this answer.

Try using your Personal Access Token instead of your password.
You can find instructions here on how to create a Personal Access Token.

Answered By – PikachuUsedSplash

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published