Top community members
All Wiki Articles Create Wiki Article

Welcome to Dirask IT community! ❤ 💻
We are community of people that helps each other.

If you are beginner in IT field, you are more then welcome to ask questions, it will help you to learn faster. We are here to help you.

We are always beginner in something, we just need to remember it along the way.

there are no wrong questions - Ask Question

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

0 contributions
7 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

  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
0 contributions

Checkout latest Findings & News:

Checkout latest questions:

Checkout latest wiki articles:

Hey 👋
Would you like to know what we do?
  • Dirask is IT community, where we share coding knowledge and help each other to solve coding problems.
  • We welcome everyone,
    no matter what the experience,
    no matter how basic the question is,
    this community will help you.
Read more