进入git bash:
-
打开命令行默认根目录: touch .git-credentials 创建文件。
-
vi.git-credentials。
-
输入https://username:[email protected],保存退出。
https://liangguohun:登入密码@https:xxx仓地址库
-
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