Git fails to commit?

Hi nixos friends!

I have a small repo that I wanted to commit to a local gitea-server

$ git commit -m "Initial commit" --verbose
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.

Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got '......')

$ git config --list --show-origin

shows the correct user.mail and user.name in both my ~/.gitconfig and .git/config

So why does not git read those files?

B.t.w git commit -m "Initial commit" --author "Name <email>" does not work either

Might be a typo, run this exact command to confirm:

git config get --show-origin --show-names --all --regexp 'user.(name|email)'

Also check your git --version to verify if there is no upstream bug or such.

But this is not really relevant to nix. Unless you find an issue with the declarative config files.

Thanks for answering!

After watching som youtube videos :slightly_smiling_face:

Then I configured it in my .config/home-manager/home.nix i.e. home manager config and the then everything worked. Seem a bit strange that it does not work with that config.

Anyhow I manged to push everything to the repo :+1: