1. sudo apt-get install git git-core
出现错误:E: Sub-process /usr/bin/dpkg returned an error code (1)解决办法:
cd /var/lib/dpkg sudo mv info info.bak sudo mkdir info
2. 进行SSH认证
ssh -T git@github.com
这边出现一个错误: ssh -T git@github.com&&Permission denied (publickey),通过分析发现:
发现在尝试id_rsa、id_dsa等文件时无法找到,所以解决方法是:
cd ~/.ssh cp github id_rsa && cp gitbub.pub id_rsa.pub cp github id_dsa cp github id_ed25519
需要说明,需要将ssh-key在github网页设置好,再次尝试,成功!
更新
git add "your file" git commit -m "change log" git push -u origin master原文链接:https://www.f2er.com/ubuntu/352054.html