zoukankan      html  css  js  c++  java
  • 向github提交代码总是要输入用户名密码

    在命令行输入命令:

    $ git config --global credential.helper store

    这一步会在用户目录下的.gitconfig文件最后添加:

    [credential]
         helper = store

    现在push你的代码 (git push), 这时会让你输入用户名密码, 这一步输入的用户名密码会被记住, 下次再push代码时就不用输入用户名密码啦!

    这一步会在用户目录下生成文件.git-credential记录用户名密码的信息.

     git config --global 命令实际上在操作用户目录下的.gitconfig文件, 我们cat一下此文件(cat .gitconfig), 其内容如下:

    [user]
     name = alice
     email = alice@aol.com
    [push]
     default = simple
    [credential]
     helper = store

    $ git config --global user.email "alice@aol.com" 操作的就是上面的email

    $ git config --global push.default matching 操作的就是上面的push段中的default字段

    $ git config --global credential.helper store 操作的就是上面最后一行的值

  • 相关阅读:
    Redis学习
    extractor
    Linux fork exec等
    Linux kill 命令
    GCC参数使用
    Shell 参数(2) --解析命令行参数工具:getopts/getopt
    Shell 参数(1)
    shell 中并发执行
    Linux 下新增用户的流程
    Linux 安全rm
  • 原文地址:https://www.cnblogs.com/rxbook/p/10666966.html
Copyright © 2011-2022 走看看