我正在参加一门课程,该课程指导我获得公共嘿,但我一直收到错误。请尽可能简单地解释一下。提前谢谢。我粘贴了以下错误:
Gwendoria@Gwencomputer MINGW64 ~
$ git config --global user.name "Del Harrison"
Gwendoria@Gwencomputer MINGW64 ~
$ git config --global user.email "[email protected]"
Gwendoria@Gwencomputer MINGW64 ~
$ ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Gwendoria/.ssh/id_rsa): vi~
vi~ already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in vi~
Your public key has been saved in vi~.pub
The key fingerprint is:
SHA256:a+9Ul5lTFcfmYNZdBMU7SkDi1BJX0ogfW6p2OzYK5G4 [email protected]
The key's randomart image is:
+---[RSA 3072]----+
| +=++..OX|
| ooo=.o+ O|
| .o *o +o|
| + . B.|
| .S . o B .|
| o + o o . |
| o+ o . |
| .E.o = |
| .. o= o |
+----[SHA256]-----+
Gwendoria@Gwencomputer MINGW64 ~
$ ssh -T [email protected]
[email protected]: Permission denied (publickey).
答案1
在 git 终端中输入
cat /c/Users/Gwendoria/.ssh/id_rsa.pub
然后将输出复制到剪贴板,以
SSH-RSA协议
并可能以
= Gwendoria@Gwencomputer
在浏览器中登录你的 github 账户。在最右上角单击你的头像并从下拉菜单中选择设置。
在设置中,在左侧菜单栏中选择
SSH 和 GPG 密钥
然后选择
新的 SSH 密钥
从剪贴板粘贴密钥。为其添加标题。单击添加 SSH 密钥。
更多信息请点击这里: