安装

sudo apt install git 
sudo apt update
sudo apt upgrafe
git -- version 	#检查是否安装

配置ssh-key

git config --global user.name "用户名"
git config --global user.email 邮箱地址
ssh-keygen -t rsa -C "邮箱地址"    #记得有引号

然后来到保存密钥的目录,将id_rsa.pub中的内容粘贴到github -> Settings -> SSH and GPG keys -> new SSH key

个人习惯

git config --global http.lowSpeedLimit 0
git config --global http.lowSpeedTime 99999999

这样方便长时间挂机克隆大仓库