Skip to content

error: committer identity unknown; please configure user.name and user.email #407

@char101

Description

@char101

Hi,

I tested running stg init (OS: Windows 10) and although I have user.name and user.email configured, I got this message: error: committer identity unknown; please configure user.name and user.email.

R:\test-git>git config --show-origin -l | rg user
file:A:/Home/.gitconfig user.name=Charles
file:A:/Home/.gitconfig user.email=my@email

R:\test-git>echo %HOME%
A:\Home

R:\test-git>stg init
error: committer identity unknown; please configure `user.name` and `user.email`.

Looking at the source it should have found the config file at HOME.

https://docs.rs/gix-config/0.34.0/src/gix_config/source.rs.html#103

For it to work I have to make a symlink from USERPROFILE to HOME, which is not a big deal but the behavior does not conform to git behavior

R:\test-git>mklink %USERPROFILE%\.gitconfig %HOME%\.gitconfig
symbolic link created for C:\Users\char\.gitconfig <<===>> A:\Home\.gitconfig

R:\test-git>stg init

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions