. Advertisement .
..3..
. Advertisement .
..4..
I encounter this error “please make sure you have the correct access rights and the repository exists.” when I’m going to use the following git clone command to clone the ck-git repository from GitHub:
git clone https://github.com/daxmann-tutorials/ck-git
When I run this command, I get this error message:
Permission denied (publickey,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What’s causing it, and how can it be resolved in the “please make sure you have the correct access rights and the repository exists.”?
The cause: I think this error happens because you are not authenticated correctly. This can happen if you alter your Git credentials or if your repository’s location has changed, and a new one with no access rights has replaced the previous one.
The solution: This problem could be solved in one of two ways:
The first thing you should do is double-check your Git remote URL to make sure it’s correct. if you want to clone a project from GitHub called daxmann-tutorials/ck-git. Let’s check the clone command we wrote earlier:
This command points to our repository correctly. You can get the access rights error if you try to clone the wrong repository. If this doesn’t work, check for SSH authentication problems. Make sure your SSH key is added to your SSH agent if you use SSH authentication to connect to a repository. This will make your SSH key available to Git, allowing it to utilize it to authenticate you with a repository. You can use the ssh-add command to verify that your SSH key has been added to your agent: Make sure your SSH key is added to your SSH agent if you use SSH authentication to connect to a repository. This will make your SSH key available to Git, allowing it to utilize it to authenticate you with a repository. You can use the ssh-add command to verify that your SSH key has been added to your agent:
Your identification files will be added to your SSH agent with this command. If the problem was that you hadn’t set up SSH authentication on your local machine, this will solve the error.