GitLab remote: HTTP Basic: Access denied and fatal Authentication

It happens every time I'm forced to change the Windows password and none of the above answers helped me.

Try the below solution which works for me:

  1. Go to Windows Credential Manager. This is done in an EN-US Windows by pressing the Windows Key and typing 'credential'. In other localized Windows variants you need to use the localized term (See comments for some examples).

    alternatively you can use the shortcut control /name Microsoft.CredentialManager in the run dialog (WIN+R)

  2. Edit the git entry under Windows Credentials, replacing old password with the new one.


You can try the following command:

git config --system --unset credential.helper

Then, enter a new password for Git remote server.


For me, the following worked:

Do not use your GitLab password, but create an access token and use it instead of your password:

  1. In GitLab, at the top-right corner, go to Personal Profile → Settings → Access Tokens Step 1

  2. Create a new personal access token (check the api option) Step 2

  3. git clone ...

  4. When you are asked for your password, copy and paste the access token instead of your GitLab password

    Step 3


I got the same error and I solved this by :

  1. Apply command from cmd (run as administrator)

    git config --system --unset credential.helper

  2. And then I removed gitconfig file from C:\Program Files\Git\mingw64/etc/ location (Note: this path will be different in MAC like "/Users/username")

  3. After that use git command like git pull or git push, it asked me for username and password. applying valid username and password and git command working.

hope this will help you...


The only thing that worked for me was using https://username:[email protected]/user/projectgit instead of https://gitlab.com/user/projectgit. See https://gitlab.com/gitlab-com/support-forum/issues/1654