git 提交时,每次都需要输入用户名、密码

来源:互联网 发布:apachemysql数据库管理 编辑:程序博客网 时间:2024/05/16 23:49

问题

  • git 提交时,每次都需要输入用户名、密码

解决

  • 使用了https协议的缘故,换成ssh协议就好了
    • $ git remote -v
      origin https://github.com/AdeGitHub/hello-world.git (fetch)
      origin https://github.com/AdeGitHub/hello-world.git (push)
  • 删除https,改为ssh协议
    • $ git remote rm origin
    • $ git remote add origin git@github.com:AdeGitHub/hello-world.git
0 0
原创粉丝点击