Git error: “Please make sure you have the correct access rights and the repository exists”

There are multiple reasons of getting this error, please check below one by one if it solves this issue –

Your git URL might have changed.

Change the URL in the local directory by using the following command

for https protocol

for ssh protocol

Your ssh key might have not been added with ssh-agent.

You have to apply following steps using your terminal:-

  1. $ eval "$(ssh-agent -s)"Agent pid 5867
  2. $ ssh-add <private-ssh-key-file-name> // eg. id_rsa (not .pub)Enter passphrase for /home/you/.ssh/id_rsa: [] Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)

Leave a Reply