Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GitLab remote: Access denied with GitLab via GitHub authorization

Tags:

git

github

gitlab

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 https://gitlab.com/Egas88/web_lab_2.git
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 https://gitlab.com/help/topics/git/troubleshooting_git#error-on-git-fetch-http-basic-access-denied fatal: Authentication failed for 'https://gitlab.com/Egas88/web_lab_2.git/'

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

like image 653
Egor Avatar asked Nov 30 '25 22:11

Egor


1 Answers

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.

like image 137
PikachuUsedSplash Avatar answered Dec 03 '25 15:12

PikachuUsedSplash



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!