Encountering 'permission denied(publickey)' Error When Pushing to GitHub via SSH

15 Views Asked by At

git branch -M main git push -u origin main error: remote origin already exists. [email protected]: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

how to resolve this error

Tried some commands like:

ssh -T [email protected] [email protected]: Permission denied (publickey).

$ eval "$(ssh-agent -s)" Agent pid 1920

0

There are 0 best solutions below