- 切换到项目目录下执行命令:
git config --global credential.helper store
- 具体执行过程如下:
root@test:/opt/testpro# git config --global credential.helper store # 如果每次拉取代码时都需要输入用户名和密码会很麻烦 root@test:/opt/testpro# git pull Username for 'http://xxx.com': xxx Password for 'http://xxx.com': Already up to date. # 再次拉取则不需要输入用户名和密码 root@test:/opt/testpro# git pull Already up to date.
- 具体执行过程如下:
解决 Git 每次拉取代码都要输入用户名和密码
最新推荐文章于 2024-05-29 15:06:59 发布