go4321 发表于 2018-9-17 10:17:16

git保存帐号密码

  每次更新git都要输入帐号密码比较麻烦,可以通过手动设置配置文件。
  window下:
  进入home文件夹,一般是C:\Users\Administrator,创建.git-credentials文件(可以先创建一个git-credentials文件,然后在git bash下使用命令 mv git-credentials .git-credentials),打开文件,输入http://{用户名}:{密码}@{服务器域名或ip} 保存
  在bash下,执行 git config --global credential.helper store
  可以看到生成了.git-config文件,里面内容为
  
  helper = store
  同样,在linux下,在个人根目录下执行同样的操作即可。

页: [1]
查看完整版本: git保存帐号密码