Search code examples
linuxgitgithubterminalclone

hey am trying to learn git and i im getting error fatal: could not read from remote repo


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.

Solution

  • 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