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 文件中

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

  • 相关阅读:
    Activit 5.13 工作流部署新版本后回退到上一个版本
    一个java的http请求的封装工具类
    FastJSON使用例子
    SoapUI、Postman测试WebService
    PLSQL连接oracle数据库
    python函数修饰符@的使用
    QEMU KVM Libvirt手册(8): 半虚拟化设备virtio
    QEMU KVM Libvirt手册(7): 硬件虚拟化
    多个router和多个network
    nova file injection的原理和调试过程
  • 原文地址:https://www.cnblogs.com/tangxin-blog/p/5719686.html
Copyright © 2011-2022 走看看