为了再git中保存账号密码,每次pull push不用输入账号密码,试了以下方法
先在命令行窗口中运行命令:
git config --global credential.helper store
再
git pull
这时会让你输入用户名的密码,在你输入了正确的用户名和密码后,下次再运行git pull或者git
push的时候就会发现再也不用输入用户名和密码了。
结果第二天的时候,git报错
remote: Not Found fatal: repository 'http://xxx/xxx.git/' not found
试了下控制面板,不得行
后面用的
先删除远程地址
git remote rm origin
再重新增加https远程仓库地址
git remote add origin http://用户名:密码@仓库地址
最后再把本地分支关联到远程分支
git branch --set-upstream-to=origin/远程分支名