问题
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:
Another solution that worked for me was changing the credentials via the Windows Credentials Manager:
- Follow the steps in this link to create an access token.
- In the upper-right corner of any page, click your profile photo.
- Click Settings
- In the left sidebar, click Developer settings
- Personal access tokens
- Generate new Token
- Go to "Windows Credential Manager" and look for your Github Enterprise account.
- Click modify and replace the password with the token you generated.
回答3:
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
回答4:
Try below one -
git clone https://<user-name>:<git-token>@<github-path.git>
回答5:
For me it worked when I deleted the old generated token and generated new one and used that
回答6:
git remote set-url origin git@github.ibm.com:WBurney/Blockchain_SDO.git
The above git command will works
来源:https://stackoverflow.com/questions/45903106/github-enterprise-remote-password-authentication-is-not-available-for-git-ope