Github enterprise - remote: Password authenticatio

2019-03-25 05:20发布

问题:

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

回答1:

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

cd /path/to/repo
git remote set-url origin git@github.ibm.com:WBurney/Blockchain_SDO.git
git push

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.



回答2:

The accepted answer will work only for ssh, not for https.

The cache reset commends seems to have recently changed. For me that eventually made it work.

git credential reject
protocol=https
host=github.<YOUR_COMP>.com


回答3:

git remote set-url origin git@github.ibm.com:WBurney/Blockchain_SDO.git

The above git command will works