【问题标题】:Git Error: fatal: bad numeric config value 'falseexit' for 'core.trustctime': invalid unitGit错误:致命:'core.trustctime'的错误数字配置值'falseexit':无效单位
【发布时间】:2017-05-31 19:56:25
【问题描述】:

我在使用git init 命令甚至是git clone 等其他命令时收到此错误。

git init
fatal: bad numeric config value 'falseexit' for 'core.trustctime': invalid unit

【问题讨论】:

标签: git


【解决方案1】:

core.trustctime 必须是布尔值:yes/no/1/0/true/false。您的 git 配置文件中有错误。编辑 .gitconfig 或 .git/config 并将 falseexit 更改为 false

PS。 falseexit,嗯...似乎有人尝试exit vim 而不从插入模式切换到正常模式。

【讨论】:

    【解决方案2】:

    我刚刚运行了以下内容:

    git config --global commit.gpgsign true
    

    【讨论】:

      【解决方案3】:

      core.trustctime 必须是布尔值

      在 Git 2.31(2021 年第 1 季度)中,改进了在预期具有布尔值的配置变量时给出的错误消息。

      参见Andrew Klotz (KlotzAndrew)commit f276e2a(2021 年 2 月 11 日)。
      (由 Junio C Hamano -- gitster -- 合并到 commit 483e09e,2021 年 2 月 17 日)

      config:改进布尔配置的错误消息

      签字人:Andrew Klotz

      当前无效的布尔配置值返回有关“bad numeric”的消息,当错误是由于布尔值引起时,这会有点误导。

      当我们知道该值既不是 bool 文本或 int 时,我们可以通过返回布尔错误消息来改善开发者体验。

      non-boolean 的布尔值无效之前,不清楚数字指的是什么:

      fatal: bad numeric config value 'non-boolean' for 'commit.gpgsign': invalid unit
      

      现在错误消息提到 non-boolean 是一个错误的布尔值:

      fatal: bad boolean config value 'non-boolean' for 'commit.gpgsign'
      

      【讨论】:

        猜你喜欢
        • 2020-02-20
        • 1970-01-01
        • 2016-02-01
        • 2010-10-04
        • 1970-01-01
        • 1970-01-01
        • 2018-06-20
        • 2012-10-13
        • 2014-02-15
        相关资源
        最近更新 更多