准备工作
在本地安装Git,并在Github注册账号。
设置Git
打开Git Bash,输入命令:
git config --global user.name "your_username"
git config --global user.email ""
创建SSH Key:
ssh-keygen -t rsa
之后会生成两个文件:id_rsa和id_rsa.pub,打开id_rsa.pub并复制其中内容。
在Github上添加SSH key
进入github.com/settings/ke… ,选择 SSH and GPG keys
选择右上角 New SSH key
在Title中给你的设备起一个名字(也可以不填),然后把id_rsa.pub的内容复制添加到key中。