I can not clone repository with git bash

2

I wonder why I can not clone a public repository of Github with git bash. I give the command git clone plus ssh or https,  but it gives the following message:

  

Permission denied (publickey).     fatal: Could not read from remote repository.

     

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

    
asked by anonymous 27.07.2017 / 19:05

1 answer

4

If the repository is public and you are giving this problem, you can use the HTTPS URL to make the clone.

Instead of using

git clone [email protected]:phplegends/sysv.git

use

git clone https://github.com/phplegends/sysv.git

Generally when using url ssh , you need to set the key. In the case of HTTPS, it is not necessary.

See below.

Justclickthe"Use HTTP" button and copy the url. Then use the git clone command.

Remarks : In Github, when using the repository HTTPS url, for git clone , git pull and the like, no password is required. But for send command, such as git push , you need to enter if you authenticate.

    
27.07.2017 / 19:17