ssplyh 发表于 2018-9-18 06:10:42

linux git ssh 无密码登陆 免密码登陆

  在github.com上 建立了一个小项目,可是在每次push的时候,都要输入用户名和密码,很是麻烦
  原因是使用了https方式 push
  在termail里边 输入git remote -v
  可以看到形如一下的返回结果
  origin https://github.com/yuquan0821/demo.git (fetch)
  origin https://github.com/yuquan0821/demo.git (push)
  下面把它换成ssh方式的。
1. git remote rm origin2. git remote add origin git@github.com:yuquan0821/demo.git3. git push origin  

  
困扰了好久好久,终于解决了。


页: [1]
查看完整版本: linux git ssh 无密码登陆 免密码登陆