2

I am getting this error when using git init command and even for other commands like git clone.

git init
fatal: bad numeric config value 'falseexit' for 'core.trustctime': invalid unit
dur
  • 15,689
  • 25
  • 79
  • 125
Jay.D
  • 21
  • 1
  • 2
  • 1
    Possible duplicate of [git init - bad numeric config value 'auto' for 'core.autocrlf' in](https://stackoverflow.com/questions/21328687/git-init-bad-numeric-config-value-auto-for-core-autocrlf-in) – Ali Jun 01 '17 at 07:55

3 Answers3

4

I just ran the following:

git config --global commit.gpgsign true
Norman Skinner
  • 6,729
  • 1
  • 19
  • 22
1

core.trustctime must be boolean: yes/no/1/0/true/false. You have an error in your git config file. Edit .gitconfig or .git/config and change falseexit to just false.

PS. falseexit, hm... seems someone has tried to exit vim without switching from insert mode to normal mode.

phd
  • 82,685
  • 13
  • 120
  • 165
0

core.trustctime must be boolean

With Git 2.31 (Q1 2021), the error message given when a configuration variable that is expected to have a boolean value has been improved.

See commit f276e2a (11 Feb 2021) by Andrew Klotz (KlotzAndrew).
(Merged by Junio C Hamano -- gitster -- in commit 483e09e, 17 Feb 2021)

config: improve error message for boolean config

Signed-off-by: Andrew Klotz

Currently invalid boolean config values return messages about 'bad numeric', which is slightly misleading when the error was due to a boolean value.

We can improve the developer experience by returning a boolean error message when we know the value is neither a bool text or int.

Before with an invalid boolean value of non-boolean, its unclear what numeric is referring to:

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

Now the error message mentions non-boolean is a bad boolean value:

fatal: bad boolean config value 'non-boolean' for 'commit.gpgsign'
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250