GitLab remote: HTTP Basic: Access denied and fatal Authentication

gitgitlab

I am on mac OS unlike this post:

I have password configured in GitLab.

I have SSL key created AFTER the project was made on GitLab.

When I use an existing folder for a new project and follow the steps below:

Existing folder

cd existing_folder
git init
git remote add origin https://gitlab.com/sobopla/Geronimod.git
git add .
git commit -m "Initial commit"
git push -u origin master

I am prompted to enter my GitLab username and password.
After password is entered I get:

remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/myname/myproject'

Best Answer

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.