From a3b33a43ef9b95dea660085e6c46c087a9cd9efd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E5=B0=91=E6=98=8E?= Date: Thu, 14 Oct 2021 17:19:23 +0800 Subject: [PATCH] add git/start.md --- git/start.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 git/start.md diff --git a/git/start.md b/git/start.md new file mode 100644 index 0000000..a66fcfb --- /dev/null +++ b/git/start.md @@ -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 仓库。