1.配置好账户后要求输入密码
有可能问题是:配好了ssh,但仓库的git remote依旧是使用http来连接的。
解决方法:
//查看仓库所使用的连接形式
git remote -v
//修改仓库的连接方式为ssh
git remote set-url origin git开头的仓库地址
2.提交时提示remote contains但本地没有时,先合并pull再push
$ git pull origin master --allow-unrelated-histories
3.丢弃远程所有修改,强制push
$ git push -u origin master -f