Unlike this post, I am on macOS.
I have the password configured in GitLab. I also have an 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, I am prompted to enter my GitLab username and password.
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
After the password is entered I get the following error.
remote: HTTP Basic: Access denied fatal: Authentication failed for 'https://gitlab.com/myname/myproject'
Go to Windows Credential Manager to edit the git entry under Windows Credentials. Replace old password with the new one. Now Try again …. And Now you can successfully push your code into Remote repository(Git)..
The “fatal: Authentication failed” error message If you enabled two-factor authentication in your Github account you won't be able to push via HTTPS using your accounts password. Instead you need to generate a personal access token. This can be done in the application settings of your Github account.
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:
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)
Edit the git entry under Windows Credentials, replacing old password with the new one.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With