sudo apt-get install git git config --global user.name "Your Name" git config --global user.email "email@example.com" ssh-keygen -t rsa -C "youremail@example.com"
然后找到.ssh,ubuntu下ctrl+H,显示隐藏的.ssh文件夹,把id_rsa.pub文件拷贝到win上,因为vim打开的话,上传到github会格式错误,拒绝添加ssh。