-2

I signed up on Github and then made private repo named lgit ("learn git") to at least try to test run command from the terminal but I am getting an error while trying to clone repo to my machine.

r3tr0@iCBM:~/test/gittest$ git clone git@github.com:username/lgit-rep.git
Cloning into 'lgit-rep'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

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

2 Answers2

2

This problem is because you have not configured your SSH keys in github, I think this could be helpful:

https://docs.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account

Also it could be because you have not your ssh key configured in your side too.

Luck
  • 21
  • 3
0

Because you're trying to clone your repo at local with SSH. You can check @Luck's answer for this.

Or with username and password, you can clone your repo with https, get the git https to clone like below.

enter image description here