add git/start.md
This commit is contained in:
parent
b6c8727457
commit
a3b33a43ef
9
git/start.md
Normal file
9
git/start.md
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
开始使用 git
|
||||||
|
---
|
||||||
|
|
||||||
|
* 安装 `git` 客户端和图形界面(例如 `TortoiseGit`,`SmartGit`),连接方式注意选择 `openssh`。
|
||||||
|
* 生成 `ssh 密钥`(Windows 用户请先打开 `git bash`),输入命令:
|
||||||
|
```ssh-keygen -t rsa -b 4096 -C "your_email@example.com"```
|
||||||
|
生成的密钥文件在 `~/.ssh` 文件夹下,其中 `id_rsa` 是私钥,请注意保密;`id_rsa.pub` 是公钥,无需保密,可放在需要使用的服务器上。
|
||||||
|
延伸阅读:[非对称加密](https://zhuanlan.zhihu.com/p/49494990)
|
||||||
|
* 打开 [设置](https://git.yztiot.com/user/settings/keys),上传公钥,才能连接远众 git 仓库。
|
Loading…
Reference in New Issue
Block a user