Git保存账密的方法

记录下避免每次都需要输入git 账密的方法。

  1. 设置记住密码十五分钟:

    git config --global credential.helper cache

  2. 如果你想自定义记住的时间,可以这样:

    git config credential.helper 'cache --timeout=3600' //这里记住的是一个小时,如需其他时间,请修改3600为你想修改的时间,单位是秒

  3. 你也可以设置长期记住密码:

    git config --global credential.helper store

原文地址:https://www.cnblogs.com/xiaoqiangink/p/13437922.html