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 "git@arobotdev:\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 ?
For me it was because of no SSH key on the machine. Check the SSH key locally:
This is your SSH key. Add it to your SSH keys in the repository.
In gitlab go to
and add the key
The rsa.pub (i.e. public key generated), needs to be added on the github>> settings>>ssh keys page. Check that, you have not added this public key in the repository-settings >> deployment keys. If so, remove the entry from here and add to the first place mentioned.
Setup of the pub-private keys in detail.
It will work hence!
Strangely I only received this error in 1 of my many repos.
My issue was after installing the new GitHub Desktop for Windows where the previous old GitHub for Win kept keys in
~/.ssh/github_rsa
and~/.ssh/github_rsa.pub
where as the new GitHub for Win expects it in~/.ssh/id_rsa
so the solution was just renaming the existing private and public keys:After which let me access the repo again without issue.
Try to use HTTPS instead SSH with taking close url from GIT, it work for me. and then take from of that url, by gitbase or any other git client.
add these lines to your
.get/config
file (thanks to @kovshenin answer Git Pull: Change Authentication) :Try https instead of ssh. Choose the https option from project home page where you copy the clone url from.