As an anonymous user (no public key stored at github) I try to clone a public repository through the git@...
URL. But it fails:
$ git clone [email protected]:mikehaertl/phpwkhtmltopdf.git Cloning into 'phpwkhtmltopdf'... Permission denied (publickey). fatal: The remote end hung up unexpectedly
So does this mean, github does not allow anonymous access through the SSH protocol? If so, is this documented somewhere?
Open Security for a repository To choose another project, see Switch project, repository, team. Open Project settings>Repositories. To set the permissions for all Git repositories, choose Security. For example, here we choose (1) Project settings, (2) Repositories, and then (3) Security.
The “Permission denied (publickey). fatal: Could not read from remote repository” error is caused by an issue with the way in which you authenticate with a Git repository. To solve this error, make sure your key is being used on your Git account. If it is not, add your key to Git.
If you want to clone it to a specific folder, just insert the folder address at the end like so: git clone https://<token>@github.com/<username>/<repository.git> <folder> , where <folder> is, you guessed it, the folder to clone it to! You can of course use . , .. , ~ , etc.
I just found out that there's another button at github that says "Git Read-only". It gives a similar but slightly different URL that works:
git://github.com/mikehaertl/phpwkhtmltopdf.git
EDIT: As @damick pointed out below the button seems to be gone now. But you can still manually change the original URL to match the pattern shown here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With