You are not logged in.

#1 2024-02-07 15:29:06

cubethethird
Member
Registered: 2016-01-25
Posts: 61
Website

Etckeeper suddenly unable to make commits.

I have been using etckeeper for many years without having to touch or change any of its configurations. Recently, I've noticed the pacman hooks either aren't working, or aren't getting triggered. When trying to trigger it manually, I am greeted with:

Committer 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: empty ident name (for <root@myhostname>) not allowed

Checking my git logs, all previous commits were logged as being from <user@myhostname> (user being my login username)

I am unsure what would have caused this change.
Any advice on how to correct this would be much appreciated.

Offline

#2 2024-02-07 19:34:41

dakota
Member
Registered: 2016-05-20
Posts: 269

Re: Etckeeper suddenly unable to make commits.

Have you tried manually creating an identity?

Git First Time Setup

$ git config --global user.name "John Doe"
$ git config --global user.email johndoe@example.com

Cheers,


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#3 2024-02-07 21:58:58

cubethethird
Member
Registered: 2016-01-25
Posts: 61
Website

Re: Etckeeper suddenly unable to make commits.

I can try that yes, but I'm wondering why suddenly, as of a few weeks ago, the existing identity it was using doesn't work.

Offline

#4 2024-02-08 01:35:23

dakota
Member
Registered: 2016-05-20
Posts: 269

Re: Etckeeper suddenly unable to make commits.

Sorry. I didn't read your post closely enough.

I would start by looking at your current identity to see if it is still set, or if something reset it to  a blank field.

git config --list --show-origin

Cheers,

Edit -- possible a recent change by git, requiring both an email and a username?

Last edited by dakota (2024-02-08 01:42:43)


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#5 2024-02-08 03:21:10

cubethethird
Member
Registered: 2016-01-25
Posts: 61
Website

Re: Etckeeper suddenly unable to make commits.

Here is the output it gave me:

file:.git/config        core.repositoryformatversion=0
file:.git/config        core.filemode=true
file:.git/config        core.bare=false
file:.git/config        core.logallrefupdates=true

I'm not sure that a git change caused this, seeing as the last update to the git package was much longer ago. Also, when looking at the existing git log, I see it formatted like so:

Author: user <user@myhostname>

Offline

#6 2024-02-08 09:16:50

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,824

Re: Etckeeper suddenly unable to make commits.

Are you sure you ran that command in the correct folder ?

I expect it to show other things besides those 4 , like remote.origin.url .

This could be due to a change on the server where your repo is hosted, have you checked there ?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#7 2024-02-08 16:15:41

cubethethird
Member
Registered: 2016-01-25
Posts: 61
Website

Re: Etckeeper suddenly unable to make commits.

I'm not hosting a separate repo anywhere. This is literally the output I get when I go into /etc, and then run git commands (with sudo, or as root)

Offline

#8 2024-02-09 04:37:09

dakota
Member
Registered: 2016-05-20
Posts: 269

Re: Etckeeper suddenly unable to make commits.

I installed etckeeper and configured it to only monitor /etc using git locally.

Running the following commands as root (from within /etc),  I'm seeing:

# git config --list
-----------------------------------
user.email=<myEmail>
user.name=<myName>
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
# git config --list --show-origin
-----------------------------------
file:/root/.gitconfig   user.email=<myEmail>
file:/root/.gitconfig   user.name=<myName>
file:.git/config        core.repositoryformatversion=0
file:.git/config        core.filemode=true
file:.git/config        core.bare=false
file:.git/config        core.logallrefupdates=true

I have no idea what changed recently, but it seems pretty clear that your identity no longer exists.

Cheers,


"Before Enlightenment chop wood, carry water. After Enlightenment chop wood, carry water." -- Zen proverb

Offline

#9 2024-02-25 18:06:26

Anakon
Member
From: France
Registered: 2024-02-25
Posts: 1

Re: Etckeeper suddenly unable to make commits.

Hi, I had the same issue.
The cause was a change in the file /etc/passwd in the filesystem package. The comment field (5th field) for the root user is missing.
Add "root" to it and git will find it's identity.

Offline

#10 2024-02-25 18:12:39

cubethethird
Member
Registered: 2016-01-25
Posts: 61
Website

Re: Etckeeper suddenly unable to make commits.

Bingo! That was indeed the problem. Thanks for pointing this out!

Offline

Board footer

Powered by FluxBB