每次git push origin mastere都要输入自己的用户名和密码,能不能让git记住,以后不再验证呢,答案是可以的。
我的git版本是2.30.0版本,低版本的可能不支持,可先查看自己是否支持该功能,如果不支持可参考我的另一篇博客进行升级git。
https://blog.csdn.net/shacheyoumen/article/details/113244366
输入如下命令:
git config --gloable credential.helper store
确认是否成功:
git config --gloable -l
结果如图:
然后使用git pull更新一下本地仓库,此时需要输入用户名和密码,本次输入以后就不需要输入了。可以再pull一下试试奥。