Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git - How to change credential [remote: HTTP Basic: Access denied fatal: Authentication failed for]

Tags:

git

gitlab

When installing my Git repository (GitKraken with GitLab), I entered the wrong password. So Git returns this error:

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

It's not offering the option to retype my password. So I'm stuck....

like image 861
DataCube Avatar asked May 25 '18 09:05

DataCube


3 Answers

I recently had the same problem on Windows. My credentials was recently been updated in Active Directory. Git bash stores credentials in the Windows Vault using Generic Credentials in the 'Control Panel > User Accounts > Credential Manager'. After updating my password to match the current value I was able to 'git push'.

like image 160
Tambu Tangban Avatar answered Nov 13 '22 15:11

Tambu Tangban


I would always advise to use SSH, but if you insist on using this approach you should be able to go (in GitKraken) to

Preferences->Authentication

and in General tab select the option to

'Forget all Username/Passwords'

enter image description here

like image 25
Marko Letic Avatar answered Nov 13 '22 17:11

Marko Letic


In my case my password was expired and it was not allowing me to enter my new password-

Below is the command I need to run to fix this issue:-

git config --global credential.helper wincred

After running above command it asks me again my updated username and password.

Here is the source for more details.

like image 2
Vikash Pandey Avatar answered Nov 13 '22 17:11

Vikash Pandey