[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. exit status 128 code example

Example 1: [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.

git remote -v
git remote set-url origin https://github.com/USERNAME/REPO.git

Example 2: reported error code “128” when it ended: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

ssh-keygen -t rsa -b 2048 -C "[email protected]"