zoukankan      html  css  js  c++  java
  • 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 文件中

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

  • 相关阅读:
    python文件处理
    pycharm基础
    lvs集群DR模式,负载均衡
    JSP动作元素<jsp:include>和<jsp:param>的搭配使用
    Mybatis的动态SQL讲解
    hibernate多对多查询
    Hibernate配置文件与映射文件详解
    maven的不同版本下载及环境配置
    二级联动,例:根据省份选择市区
    关于JSP页面的静态包含和动态包含
  • 原文地址:https://www.cnblogs.com/tangxin-blog/p/5719686.html
Copyright © 2011-2022 走看看