尝试匿名克隆github存储库时权限被拒绝

Mic*_*rtl 20 git github

作为匿名用户(没有存储在github上的公钥),我尝试通过git@...URL 克隆公共存储库.但它失败了:

$ git clone git@github.com:mikehaertl/phpwkhtmltopdf.git
Cloning into 'phpwkhtmltopdf'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

这是否意味着,github不允许通过SSH协议进行匿名访问?如果是这样,这是在某处记录的吗?

Mic*_*rtl 36

我刚刚发现github上有另一个按钮,上面写着"Git Read-only".它提供了一个类似但略有不同的URL:

git://github.com/mikehaertl/phpwkhtmltopdf.git
Run Code Online (Sandbox Code Playgroud)

编辑:正如@damick在下面指出的那样按钮似乎已经消失了.但您仍然可以手动更改原始URL以匹配此处显示的模式.


小智 6

这很可能是因为它试图使用SSH凭据,而https却没有.因此,当你使用

git clone git://github.com/mikehaertl/phpwkhtmltopdf.git
Run Code Online (Sandbox Code Playgroud)

有效.:d

  • 这是对另一个答案的回复,不包含答案 (2认同)