解决git push/pull需要输入用户名密码的问题
·
问题描述
每次在git bash中push时都需要输入用户名和密码,于是想着能够自动登录。
解决方法
- 在git bash中执行
git config --global credential.helper store
- 然后下一次push时重输一边用户名和密码
此后就不需要多次重复了。亲测有效。
如果一不小心输错密码了怎么办?将会报错
remote: 【username】: Incorrect username or password (access token)
fatal: Authentication failed for 'https://github.com/.......git/'
这时就需要重置密码
git config --system --unset credential.helper
更多推荐
所有评论(0)