Git error: “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

there might be multiple causes for the issue

  1. If the issue is with your ssh identity, go through @onkar-m18 answer here
  2. If ssh key is not added to hosting server, go through @lovekush-vishwakarma answer here

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)