github – Git error: Please make sure you have the correct access rights and the repository exists

github – 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 [email protected]: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

That problem might be having with your ssh-agent, your ssh key hasnt 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

    Enter passphrase for /home/you/.ssh/id_rsa: []
    Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)

then it will work..cheers J.

github – Git error: Please make sure you have the correct access rights and the repository exists

Try to use HTTPS instead SSH while taking clone from GIT, use this Url for take clone , you can use Gitbase, Android Studio or any other tool for clone the branch.
enter

Leave a Reply

Your email address will not be published.