GitLab Remote: HTTP Basic: Access denied. fatal: Authentication failed
Hello,
I have a project with Asp.net Core 3.1 and I managed source code by using GitLab.
Today I changed the password of GitLab and I try to pull code with git pull
command and I got an error remote: HTTP Basic: Access denied. fatal: Authentication failed for 'https://gitlab.com/bookmanager/bookmanager_v2.git/'.
E:\Project\abc\2019\BookManager\v2\BookManager3\bookmanager_v2\QDM.CMS (master -> origin)
λ git pull
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/bookmanager/bookmanager_v2.git/'
I tried to remove the origin and re-add it, like this:
git remote -v
git remote remove origin
git remote add origin git@github.com:user/repo.git
But it does not work for me.
Do you have any suggestions for me?
- d0
dang nhat hai long Nov 09 2021
Because you change the password so you need to re-login into Gitlab. You can do as below:
1. Open Cmd, run with mode Run As Administrator. (it's required)
2. Run command
git config --system --unset credential.helper
It will require you to enter your Username & Password.
After login success, you can run
git pull
well for you.I hope it is solved for you.
- N-3
Nguyễn Danh Bảo An Nov 09 2021
Hi, I got the same issue whenever I change my login password.
Below is the command I need to run to fix this issue:-
git config --global credential.helper wincred
After running this command, it will ask you again to update your
username
andpassword
.And solved the issue for you.
* Type maximum 2000 characters.
* All comments have to wait approved before display.
* Please polite comment and respect questions and answers of others.