我正在尝试克隆一个 github wiki 并创建一个与 RStudio 一起使用的本地存储库,类似于我在 wiki 所在的主存储库中使用 github。我正在尝试按照说明克隆 wiki ,这是来自的错误输出命令行:
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\Users\trinker\GitHub>git clone git@github.com:trinker/qdap.wiki.git
Cloning into 'qdap.wiki'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
我在 stackoverflow 上搜索了错误消息并得到了这篇文章(LINK)。错误消息几乎相同。我和那张海报的区别在于我对命令行不满意,也不知道要输入什么来解决问题。我尝试了这个人的修复(LINK),结果如下:
C:\Users\trinker\GitHub>set HOME=C:\Users\trinker
C:\Users\trinker\GitHub>ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/trinker/.ssh/id_rsa): C:\Users\tri
nker\.ssh
C:\Users\trinker\.ssh already exists.
Overwrite (y/n)? n
C:\Users\trinker\GitHub>ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/trinker/.ssh/id_rsa):
/c/Users/trinker/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/trinker/.ssh/id_rsa.
Your public key has been saved in /c/Users/trinker/.ssh/id_rsa.pub.
The key fingerprint is:
d6:ce:b5:23:0c:0d:c0:31:9f:8e:32:34:b9:79:43 trinker@TRINKER-HP
C:\Users\trinker\GitHub>CD C:\Users\trinker\GitHub
C:\Users\trinker\GitHub>git clone git@github.com:trinker/qdap.wiki.git
Cloning into 'qdap.wiki'...
Permission denied (publickey).
fatal: The remote end hung up unexpectedly
C:\Users\trinker\GitHub>
注意我更改了密钥中的几个字符,因为我不确定这是否是不安全的发布内容。
Windows 7 用户