EN
GitLab - git pull remote: HTTP Basic: Access denied fatal: Authentication failed for
10
points
Problem:
How to solve error:
GitLab - git pull remote: HTTP Basic: Access denied fatal: Authentication failed for
I use git bash on windows 10.
Error occurs when I make git pull on remote repository from gitlab.
Console error:
$ git pull
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/user_name/project_name'
Solution 1 - Windows Credentials Manager
- Go to windows search - type: Credential Manager
- Open Credential Manager
- Click on Windows Credentials
- Generic Credentials
- Find gitlab credentials
- Edit or Remove gitlab credentials
* After we remove gitlab credentials
we make git pull on gitlab repo again, we will be asked to provide gitlab credentials
Why this problem occurs:
- Our credentials are incorrect, make 100% sure that the credentials are valid
- We have more then 1 gitlab account saved with windows credentials
Solution 2 - git unset credential
- Open git bash as administrator
- Go to the gitlab repository dir
- Executre:
$ git config --system --unset credential.helper
- Executre:
$ git pull
- Enter new password
If we open git bash as not an administrator (as plain user - without administrator rights),
we will get error: could not lock config file - Permission denied:
$ git config --system --unset credential.helper
error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig:
Permission denied