参考博客:
Ubuntu下git的安装与使用 - L.X.M - 博客园
1.下载安装sudo apt-get install git2、配置账号
git config --global user.name "xxx" git config --global user.email "你的邮箱地址"3、生成公钥
ssh-keygen -C 'you email address@gmail.com' -t rsa4、将公钥添加到github.com中
cd ~/.ssh sudo gedit id_rsa.pub
进入~/.ssh文件夹,输入gedit id_rsa.pub打开id_rsa.pub文件,复制其中所有内容
添加到github的ssh中
5、验证连接ssh -T git@github.com
成功结果为:
Hi haoxr! You've successfully authenticated, but GitHub does not provide shell access.



