This blog will explain the method for resolving the discussed Git repository error.
How to Resolve the “Please make sure you have the correct access rights and the repository exists” Error?
Perform the following steps to resolve the above-stated error:
- Navigate to the Git repository.
- List the repository content.
- Add the remote URL to the list with the help of the “git remote add <remote-name> <remote-url>” command.
- Run the “git pull <remote>” command.
Step 1: Switch to Git Repository
At first, go to the Git required repository by executing the “cd” command:
Step 2: List Repository Content
Then, use the “ls” command to view the list of existing repository content:
Step 3: Git Pull Remote Origin
Now, download the updated content of the required remote repository with the help of the following command:
As you can see, when we are trying to pull the remote repository’s latest code version, it shows the highlighted error:
Now, to resolve the above-displayed error, first view the remote URL.
Step 4: Check Remote URL’s List
Use the given below command to view the remote repository URL list:
It can be seen that the remote URL list is empty:
Step 5: Add Remote URL
To add the required remote repository URL, run the “git remote” command:
Step 6: Download Remote Repository Content
Finally, execute the “git pull” command for updating the local repository:
It can be observed that the pull operation has been performed successfully:
We have compiled the easiest way to resolve the mentioned error.
Conclusion
To resolve the “Please make sure you have the correct access rights….” error, first, move to the Git repository and list its content. Then, add the remote URL to the list with the help of the “git remote add <remote-name> <remote-url>” command. Finally, execute the “git pull <remote>” command. This blog explained the procedure for resolving the specified error.