GIt环境配置
本人使用linux ubuntu操作
-------------------------------------------------------------------------------------
1.官网下载
https://git-scm.com/downloads
因为我是ubuntu,所以使用命令安装
sudo apt-get install git
* 安装成功后,使用命令git version查看版本
git version 2.17.1
-->输出版本则正常
2.配置账号
注册github或者gitee账号;(百度对应网站注册)
windows:鼠标右键打开gitbash进行输入命令
linuxs:直接敲命令
配置用户名:git config --global user.name "your name"
配置邮箱:git config --global user.email "your email address"
验证配置结果:git config --global --list
3.生成对应公钥私钥
ssh-keygen -t rsa -C "your email address@address.com"
三次回车,不需要特别配置
输出结果:
ssh-keygen -t rsa -C "xxxx@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/manshuo/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/manshuo/.ssh/id_rsa. (公钥私钥保存在这里,这是私钥)
Your public key has been saved in /home/manshuo/.ssh/id_rsa.pub.(这是公钥)
The key fingerprint is:
SHA256:TJWKW2+l3rsof5nRxx8Fqb xxxx@qq.com
The key's randomart image is:
+---[RSA 2048]----+
| .+..oo. |
| Eooo .o |
| o=... + |
| .*+.o * + .|
| oS+ B + ..|
| . . O . o|
| * * o + |
| . B.= + o|
| o..o+ + |
+----[SHA256]-----+

浙公网安备 33010602011771号