相关疑难解决方法(0)

ssh clone无法使用github

我是Git和GitHub的新手.

我创建了一个新的存储库,并尝试在我的本地计算机上克隆.

它适用于https和git-readonly URL.也就是说,以下工作正常:

  • git clone https://github.com/npsabari/testrepo.git
  • git clone git://github.com/npsabari/testrepo.git

但是当我尝试时git clone git@github.com:npsabari/testrepo.git,它没有用.它给出了以下错误消息:

Cloning into 'testRepo'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)

然后我尝试了ssh git@github.com,但我得到了错误:

"Permission denied (publickey)."
Run Code Online (Sandbox Code Playgroud)

而不是欢迎消息.

我该怎么做才能解决这个问题?错误的原因是什么?

git github

16
推荐指数
3
解决办法
6万
查看次数

标签 统计

git ×1

github ×1