第一步:进入项目目录,在 git 终端执行以下命令:
git config --global credential.helper store
第二步:重新执行一次git pull,这次它还是提示你输入账号和密码:
git pull
Username for 'https://git.xxxxxxxx.com': ******
Password for 'https://demo123@163.com': *******
后面再 pull 或者 push 的时候,就不用输入账户和密码了。