Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github enterprise - remote: Password authentication is not available for Git operations

My git was working fine, then without changing anything than the following problem started to happen, I have tried resetting the cache in

credentials.helper

and have gone through pretty much every stackoverflow answer I could find

remote: Password authentication is not available for Git operations. remote: You must use a personal access token or SSH key. remote: See https://github.ibm.com/settings/tokens or 'https://github.ibm.com/WBurney/Blockchain_SDO.git/':  The requested URL returned error: 403 

Thanks

like image 665
Muhammad Raafay Khan Avatar asked Aug 27 '17 08:08

Muhammad Raafay Khan


People also ask

How do I fix support for password authentication was removed from GitHub?

How to fix remote: Support for password authentication was removed? Since we cannot use account passwords when authenticating git operations, we can fix this issue by generating the PAT(Personal Access Token) in GitHub and using the PAT as authentication for Git operations.

Why did GitHub remove password authentication?

Github has removed the support for Password Authentication from August 13, 2021. The password authentication support has been eliminated because it is easy for people to crack the passwords. A personal access token can reduce the damage. Now GitHub will not allow if you try to use git by username and password.


1 Answers

If you have registered a public ssh key to your GitHub enterprise account, you could side-step the issue using an ssh url

cd /path/to/repo git remote set-url origin [email protected]:WBurney/Blockchain_SDO.git 

Then any command like git push/git fetch/git pull/git ls-remote would use the SSH URL set by git remote set-url.

But regarding your original issue, try and follow "Creating a personal access token for the command line".

If you are on Mac, update your credentials from the OSX Keychain.

You might need to remove an old cached credential first.
(As commented by RayLoveless)

like image 109
VonC Avatar answered Sep 25 '22 03:09

VonC