Empty ident when REMOTE_USER is an E-mail address
- Dominant language
- Haskell
- Stars
- 2.3k
- Forks
- 231
- PR merge metrics
- No merged PRs in 30d
Description
I have gitit setup behind a reverse proxy, where REMOTE_USER is set to a full E-mail address, by authenticating from mod_auth_openidc and a Google account.
~~~
RequestHeader set REMOTE_USER %{OIDC_CLAIM_email}e
~~~
The setting of the header works fine, however when I try to commit I get this error:
~~~
Happstack 7.4.5
Something went wrong here
Internal server error
Everything has stopped
The error was "UnknownError: Could not git commit git.page *** 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 ) not allowed "
~~~
Running `strace -f -p ` on the gitit process, I see:
~~~
[pid 5548] execve("/usr/bin/git", ["git", "commit", "--author", "brian@example.com <>", "-m", "test edit", "git.page"], [/* 8 vars */]) = 0
~~~
That is, the ident within `<>` is empty.
Workaround: if I actually set an identity as suggested in the error
~~~
git config --global user.email gitit@example.com
git config --global user.name gitit
~~~
...then the web interface commit succeeds, although the commit messages still have the strange format:
~~~
Author: brian@example.com <>
~~~
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.