[Solved] Please make sure you have the correct access rights and the repository exists

Your git URL might have changed. Change the URL in the local directory by using the following command.

for HTTPS protocol,

git remote set-url origin https://github.com/username/repository.git

for SSH protocol

git remote set-url origin git@github.com:username/repository.git

Please also check:

  1. Repo is private or public? If it’s private then ask owner to add you as a maintainer.
  2. Repo URL is valid or not?

I hope you got the answer. Cheers.

Leave a Comment