-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
alan.christopher.jenkins@a53b5c6056bc7d7b09e181c23cc2ec8362fa7abe
authored and
admin
committed
Jun 2, 2017
1 parent
456f098
commit e6b9003
Showing
1 changed file
with
14 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
...do/requires___96__user.email__96___be_set_under_undocumented_circumstances.mdwn
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
[[https://unix.stackexchange.com/questions/368850/ansible-role-why-do-i-have-to-set-user-email-in-etckeeper/368851]] | ||
|
||
etckeeper expects that users set git `user.email`. But it does not document this, or suggest a best way to do it. | ||
|
||
In common usage, this expectation is masked. I believe the conditions for it breaking are: | ||
|
||
1. user.email is not set in git, AND | ||
2. the system hostname cannot be resolved to an FQDN, AND | ||
3. etckeeper is not run from sudo AND | ||
4. etckeeper is not run from a tty | ||
|
||
In this situation, etckeeper requires users to set `user.email` in /root/.gitconfig, or to have set it in /etc/.git/config immediately after `etckeeper init`. As per link, these situations can occur when using Ansible. | ||
|
||
IMO, considering how to document this behaviour shows it to be user-unfriendly. Therefore, it would be simplest if etckeeper could fall back to using `$(id -un)`, once `$(tty)` fails. |