Languages
[Edit]
EN

GitLab - git pull remote: HTTP Basic: Access denied fatal: Authentication failed for

10 points
Created by:
Lia-Perez
505

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

  1. Go to windows search - type: Credential Manager
  2. Open Credential Manager
  3. Click on Windows Credentials
  4. Generic Credentials
  5. Find gitlab credentials
  6. 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:

  1. Our credentials are incorrect, make 100% sure that the credentials are valid
  2. We have more then 1 gitlab account saved with windows credentials

Solution 2 - git unset credential

  1. Open git bash as administrator
  2. Go to the gitlab repository dir
  3. Executre: $ git config --system --unset credential.helper
  4. Executre: $ git pull
  5. 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

References

  1. git config - docs
  2. Accessing Credential Manager - microsoft docs

Alternative titles

  1. Windows git password problem - git pull remote: HTTP Basic: Access denied fatal: Authentication failed for
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join