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 sur
This issue can be caused because sometimes ssh-agent
is not persistent across reboots. You should check if ssh-agent
has your key added:
ssh-add -l -E md5
if you get the output like:
The agent has no identities.
it means ssh-agent
has lost your key. In that case, you simply need to add the identity key again. Something like:
ssh-add ~/.ssh/git_rsa
The error should disappear now!
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
For me i was having issue with company VPN, after disconnecting working fine.
Check connection with github using command ssh -vvvT git@github.com
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:
~/.ssh/github_rsa -> ~/.ssh/id_rsa
~/.ssh/github_rsa.pub -> ~/.ssh/id_rsa.pub
After which let me access the repo again without issue.
For me it gave the same error of:
Please make sure you have the correct access rights and the repository exists.
A quick fix was to eliminate the ~/.ssh/config file
mv config config_old && touch config
eval "$(ssh-agent -s)"
git clone your_repo
As it turned out to be the config file that was corrupt and configured with two ids
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:-
$ eval "$(ssh-agent -s)"
Agent pid 5867
$ 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.