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

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

  • 相关阅读:
    poj 3087 直接模拟
    POJ-3126 BFS,埃式筛选及黑科技
    POJ3278-Catch That Cow
    js变量提升
    饿了么
    2分钟就能学会的【Google/百度搜索大法】了解一下?
    span标签间距
    Vue移动端项目如何使用手机预览调试
    Port 3000 is already in use
    koa2第一天 async详解
  • 原文地址:https://www.cnblogs.com/tangxin-blog/p/5719686.html
Copyright © 2011-2022 走看看