git 创建密匙

—git–安装步骤省略

打开 git bash here
  1. 输入 git config --global user.name “gang” 回车
    引号中是名字,可以随便设置

  2. 输入git config --global user.email “1529440****@163.com” 回车.引号中是email地址

  3. 输入 cd ~/.ssh查询是否存在密匙
    如果返回No such file or directory
    输入**ssh-keygen -t rsa -C “1529440****@163.com”**回车,生成密匙

Administrator@PC-202003031912 MINGW64 ~/Desktop
$ git config --global user.name "gang"

Administrator@PC-202003031912 MINGW64 ~/Desktop
$ git config --global user.email "15294408888@163.com"

Administrator@PC-202003031912 MINGW64 ~/Desktop

bash: c: command not found

Administrator@PC-202003031912 MINGW64 ~/Desktop
$ cd ~/.ssh
bash: cd: /c/Users/Administrator/.ssh: No such file or directory

Administrator@PC-202003031912 MINGW64 ~/Desktop
$ ssh-keygen -t rsa -C "15294408888@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Created directory '/c/Users/Administrator/.ssh'.
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
The key fingerprint is:
SHA256:s8JMzEXWXPLOGnEh+TLMPz6AkV3TIPlcGIvsHfO+PLQ 15294402043@163.com
The key's randomart image is:
+---[RSA 3072]----+
|        oo++==   |
|       o .=*+oo  |
|        .=+=*o   |
|     o .o.**++   |
|      + Soo++ .  |
|     +  .o.oo..  |
|      + . .o o.. |
|       .    o.E. |
|             .o. |
+----[SHA256]-----+


发布了3 篇原创文章 · 获赞 0 · 访问量 30
展开阅读全文

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 深蓝海洋 设计师: CSDN官方博客

分享到微信朋友圈

×

扫一扫,手机浏览