【问题标题】:What is "git config user.password"?什么是“git config user.password”?
【发布时间】:2021-11-30 17:35:54
【问题描述】:

我已经看到 git config user.password 在多个 Stack Overflow 答案中被推荐为保存 git 用户凭据的一种方式。

How can I save username and password in Git?

How to change my Git username in terminal?

Retyping Username and Password in Git Bash for Github access

但是,我在the Git documentation 中找不到任何提及user.password 的内容,只有user.name 和user.email。似乎没有一个答案链接到关于它究竟做了什么或如何使用它的资源。

什么是git config user.password,你如何使用它?它是配置凭据管理器的另一种方法,还是有什么不同?

【问题讨论】:

    标签: git authentication config


    【解决方案1】:

    这些答案完全是错误的。

    Git 配置文件可以让你设置任何你喜欢的旧东西,例如:

    git config user.aardvark zebra
    

    和:

    git config helicopter.rotor airplane
    

    由于没有参考这些设置,它们没有任何效果。

    【讨论】:

    • 前两个答案被高度评价,你确定吗?
    • 是的。当然,可以编写您自己的程序来读取helicopter.rotor 设置,也许有人在很久以前写过一个读取user.password 的程序。
    • (当然转子设置应该是一个俯仰角,但是……)
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-06
    • 2014-01-31
    • 2016-11-02
    • 1970-01-01
    • 2012-03-26
    相关资源
    最近更新 更多