• GIT 在本地保存账户和密码


    git config credential.helper cache                  // 当前项目,暂时存储密码,默认15分钟
    git config credential.helper 'cache --timeout=3600' // 当前项目,暂时存储密码,自定义时间(秒)
    git config credential.helper store                  // 当前项目,永久存储密码
    git config user.name XXXX                           // 当前项目,设置用户名
    git config user.email ***@***.com                   // 当前项目,设置用户邮箱

    在 .git  文件夹所在的目录,按照需要执行上面的命令(不需要全部执行,参见注释),可以对当前项目产生效果.执行完之后,可以在 .git/config 文件中看到刚才所设置的参数,你也可以手动编辑这个文件,达到设置的效果.

    git config --global credential.helper cache                  // 当前用户所有项目,暂时存储密码,默认15分钟
    git config --global credential.helper 'cache --timeout=3600' // 当前用户所有项目,暂时存储密码,自定义时间(秒)
    git config --global credential.helper store                  // 当前用户所有项目,永久存储密码
    git config --global user.name XXXX                           // 当前用户所有项目,设置用户名
    git config --global user.email ***@***.com                   // 当前用户所有项目,设置用户邮箱

    在任意地方,按照需要执行上面的命令(不需要全部执行,参见注释),可以对当前用户所有项目产生效果.执行完之后.

    Windows用户可以在  C:Users用户名.gitconfig 文件中

    Linux用户可以在 /root/.gitconfig 文件中

    看到刚才设置的参数,你也可以手动编辑这个文件,达到设置的效果.

  • 相关阅读:
    xp下双开3389源码
    批处理加密解密原理
    Durango框架开源
    细说PHP5.3.4变量的引用赋值
    svnversion
    sqlite 的使用
    message日志_默认是一周一个日志,保存4周
    Smartmontool 使用
    NETRA之数据库处理
    mysql 日志转
  • 原文地址:https://www.cnblogs.com/tangxin-blog/p/5719686.html
Copyright © 2020-2023  润新知