Mac 切换仓库地址后每次都要重新输入密码

进入git bash:

  1. 打开命令行默认根目录: touch .git-credentials 创建文件。

  2. vi.git-credentials。

  3. 输入https://username:[email protected],保存退出。

    https://liangguohun:登入密码@https:xxx仓地址库

  4. git config --global credential.helper store, 然后cat .gitconfig 会增加一行:helper=store。 全局配置用户名和邮箱:

git config user.name 查询
git config --global user.name "liangguohun"
git config --global user.email "[email protected]"
复制代码

转载于:https://juejin.im/post/5d0a488e51882546dd10127f

猜你喜欢

转载自blog.csdn.net/weixin_33762321/article/details/93180236