问题描述

每次在git bash中push时都需要输入用户名和密码,于是想着能够自动登录。

解决方法

  1. 在git bash中执行
git config --global credential.helper store
  1. 然后下一次push时重输一边用户名和密码

此后就不需要多次重复了。亲测有效。

如果一不小心输错密码了怎么办?将会报错

remote: 【username】: Incorrect username or password (access token)
fatal: Authentication failed for 'https://github.com/.......git/'

这时就需要重置密码

git config --system --unset credential.helper
Logo

腾讯云面向开发者汇聚海量精品云计算使用和开发经验,营造开放的云计算技术生态圈。

更多推荐