Git - 每次 git pull/push 时需要账号和密码解决方案

问题描述

在提交项目代码或者拉取代码的时候,每次 git 都要输入用户名密码,很烦~

解决方案

  • 让服务器记下来用户名和密码,此时输入一次,以后再 git push /pull 的时候就不用再输账号和密码了
# 配置 git 记录用户名和密码
git config --global credential.helper store

# 输入账号、密码
……

# 查看配置
cat ~/.gitconfig

你可能感兴趣的:(#,Git,Git,git,push,git,pull,账号,密码,git,config,global,credential)