首先要安装一个命令行工具GitBash.
然后开始我们下面的步骤。
github配置
1,注册一个github账号,登陆。
2,进入 https://github.com/settings/keys
3,点击 New SSH key,你需要输入 Title 和 Key,但是你现在没有 key,往下看
4,打开 Git Bash
5,运行 ssh-keygen -t rsa -b 4096 -C "你的邮箱"
,注意填写你的邮箱!按回车三次
6,运行 cat ~/.ssh/id_rsa.pub
,得到一串东西,完整的复制这串东西,
7,回到上面第 3 步的页面,在 Title 输入「我的第一个 key」
在 Key 里粘贴刚刚你你复制的那串东西
8,点击 Add SSH key
9,回到 Git Bash运行 ssh -T git@github.com
10,如果你看到
Hi shuyan! You've successfully authenticated, but GitHub does not provide shell access.
就说明你成功了!
1,一台电脑只需要一个