[Error] git push : fatal: Authentication failed

>>> /usr/bin/git push origin HEAD:refs/heads/main
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/englianhu/Coursera-Machine-Learning-for-Trading.git/'

system prompt above error when git push, and then refer to git - GitHub: invalid username or password - Stack Overflow, try to git remote set-url origin git@github.com:englianhu/Coursera-Machine-Learning-for-Trading.git but terminal shows below error:

/cloud/project$ git push
The authenticity of host 'github.com ({IP Address})' can't be established.
RSA key fingerprint is {KEY}.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,{IP Address' (RSA) to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

by refer to Continuing the discussion from Permission Denied Creating SSH RSA Key:, try to create own rsa_key, anyone know how to tune it? Help! Repo not letting me push to Github. - #2 by FJCC is another similar problem but doesn't help

/cloud/project$ git remote set-url origin https://www.github.com/englianhu/Coursera-Machine-Learning-for-Trading.git
/cloud/project$ git push
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/englianhu/Coursera-Machine-Learning-for-Trading.git/'
/cloud/project$ git config -l
credential.helper=cache --timeout 43200
user.email={EMAIL ADDRESS}
user.name=peer evaluate please
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=https://www.github.com/englianhu/Coursera-Machine-Learning-for-Trading.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.main.remote=origin
branch.main.merge=refs/heads/main
/cloud/project$ vim ~/.gitconfig
/cloud/project$ 

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.