配置Git
1.安装Git:
sudo apt install git
2.本地生成ssh key:
ssh-keygen -t rsa -C "myname@email.com"
默认生成的key在.ssh/id_rsa.pub,可使用cat查看
3.在github中添加ssh key:
登录github ——> Account Settings ——> SSH Keys ——> Add SSH Key,粘贴ssh key,添加title
4.测试ssh key是否成功:
ssh -T git@github.com
若出现 Hi XXX! You've successfully authenticated, but GitHub does not provide shell access.
表示已经成功连接github(warning忽略)。
若出现 Agent admitted failure to sign using the key.Permission denied (publickey).
使用命令</