Advertisement
Advertisement


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


Question

I am using TortoiseGit on Windows. When I am trying to Clone from the context menu of the standard Windows Explorer, I get this error:

Please make sure you have the correct access rights and the repository exists

More precisely, the snapshot of terminal is the following:

git.exe clone --progress -v "[email protected]:\git\AlfaRobot.git" "C:\Work\AlfaRobot"

Cloning into 'C:\Work\AlfaRobot'...
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

git did not exit cleanly (exit code 128) (21450 ms @ 19.09.2014 10:36:58)

What should I do to make git work properly ?

2019/01/25
1
99
1/25/2019 10:46:27 AM


That problem might be having with your ssh-agent, your ssh key hasn't 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.

2020/06/20

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 image description here


For me it was because of no SSH key on the machine. Check the SSH key locally:

$ cat ~/.ssh/id_rsa.pub

This is your SSH key. Add it to your SSH keys in the repository.
In gitlab go to

profile settings -> SSH Keys

and add the key

2017/01/26

Github now uses a url scheme

git remote set-url origin https://github.com/username/repository.git

2019/09/03

You are trying to clone the repository over ssh: [email protected], and your SSH keys are not properly set on server. There are multiple reasons to this:

  1. Your public key might not be saved in authorized_keys file of user git
  2. If 1 is not true the Your private key is not saved in .ssh/ folder of your HOMEDIR.
  3. Permissions are not properly set

If all 3 above are untrue then my only conclusion can be to try: [email protected]:AlfaRobot.git Assuming AlfaRobot.git is in HOMEDIR of git user and not inside a folder called git which resides in HOMEDIR of user git.

2014/09/19