git 解决每次更新代码都要输入用户名和token的解决方案

参考:git 解决每次push代码都要输入用户名密码和git token失效的问题

Github从2021年8月14日开始就不支持用户密码输入了:remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
在官网配置好token之后,保存到本地txt,但是奈何每次push都要复制粘贴token。参考上述链接后,发现了如下解决方案:

在某一次push之前输入,

git config --global credential.helper store
git push origin 分支名

那以后push的时候就都不用复制粘贴token了

猜你喜欢

转载自blog.csdn.net/weixin_45910027/article/details/131616176
今日推荐