git 使用

  1. 下载 git bash
  2. 根据选择进行安装
  3. 配置全局 git 用户
  4. 配置 ssh key

下载 git bash

gitforwindows

根据选择进行安装

配置全局 git 用户

配置 ssh key

ssh-keygen -t rsa -b 4096 -C "chgocn@gmail.com"
cat ~/.ssh/id_rsa.pub
Lenovo@DESKTOP-91MGDB0 MINGW64 /c/project
$ ssh-keygen -t rsa -b 4096 -C "chgocn@gmail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Lenovo/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Lenovo/.ssh/id_rsa
Your public key has been saved in /c/Users/Lenovo/.ssh/id_rsa.pub
The key fingerprint is:
SHA256:UOAA1E2ZjkPA9WrkddzdmhH+mmZRaDn3pSbGj2fg9ew chgocn@gmail.com
The key's randomart image is:
+---[RSA 4096]----+
| o+=ooo+.   .    |
|  . o++o . o =   |
|   ..o= o . O + .|
|   ooo.o   o O o.|
|    +.  S   O = .|
|   .       o @ o |
|            B + o|
|           o o . |
|                E|
+----[SHA256]-----+

Lenovo@DESKTOP-91MGDB0 MINGW64 /c/project
$ cat ~/.ssh/id_rsa
id_rsa      id_rsa.pub

Lenovo@DESKTOP-91MGDB0 MINGW64 /c/project
$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDXdHraHrsJpZJrs3cCXag8Bdbj6U+oW6XyxwVcGowTLOSpppSyDu/nwiZeCBmzW3EQsDtQ2GAxQt3ZJtrl3ucIINACfEnH+2xJ/ymoI1NF4Y35AqhK6gEgDkUEzJwI/NeEwvyYtTfu9cnGPXQjeII+KJZ3s+Q6TJx2hSnpH6bL6gNxyyiyzkFjPLqArki2SAaNwHXE3fwgEebllqzStiY5+rtgdP6Wzs+lPYnSH6heKGAIt87J2bETQcPRpqpWmHYiKAPjj2Hs/fW99YEUAWNP0OIFwkJrstkn6/FamAAIaigL6c4xXlanz0cGo9mG0hEDB7EkzWy5z6ZLLPMegNZIoxvcU1gnaH+2ymhWz1UZLzq8tY1q32QAEDC2MgeQYjys/SrdTh+Nk7pVaPJ/Cg2AmWmLlDeCpXwK/zJqTJANG/oBQCfKrQpCW+3AxBRBZLSoPCKfHbot2kmiXWEyW+cejMewg2W/R8h05P7qT1v2N4dx+en8b5q...

转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 chgocn@gmail.com
笔记