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

posted @ 2020-08-05 09:50  萧蔷ink  阅读(351)  评论(0)    收藏  举报