到会连接github需要用到 Enter passphrase (empty for no passphrase): E

时间:2021-12-30 06:27:47

 git config --global user.name "账户名"

 git config --global use r.email ‘账户邮箱‘

生成ssh,命令: ssh-keygen -t rsa 

但是在window终端上ssh命令不能用,只能在Git安置目录下的打开git-bash.exe操纵,法式如下:

Git安置目录下,

找到 git-bash.exe

 输入:ssh-keygen -t rsa -C "[email protected]"

Administrator /
$ ssh-keygen -t rsa -C "[email protected]"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):  这里需要你输入一个暗码,到会连接github需要用到
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Passphrases do not match. Try again.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.

然后到你的GIthub上创建ssh

到会连接github需要用到 Enter passphrase (empty for no passphrase): E

然后再git-bush.exe,上输入以下命令:

# ssh [email protected]

然后 ,会呈现 Enter passphrase for key ‘/c/Users/Administrator/.ssh/id_rsa‘:

叫你输入适才生成sshkey 时,你输入的阿谁暗码

呈现以下情况,暗示连接告成。

到会连接github需要用到 Enter passphrase (empty for no passphrase): E