Module: check_mk
Branch: master
Commit: 46628eb7d14b5ebedf1906bd7e3278e066afd128
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=46628eb7d14b5e…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Tue Jul 28 12:28:49 2015 +0200
#2499 FIX Git: Fixed message "Please tell me who you are. Run git config ..." on
making changes
At least on Ubuntu 15.04 a user/mail had to be configured in the git repository. Even
when the single changes of the users do set an own author.
---
.werks/2499 | 11 +++++++++++
ChangeLog | 1 +
web/htdocs/wato.py | 6 ++++++
3 files changed, 18 insertions(+)
diff --git a/.werks/2499 b/.werks/2499
new file mode 100644
index 0000000..ce5ca55
--- /dev/null
+++ b/.werks/2499
@@ -0,0 +1,11 @@
+Title: Git: Fixed message "Please tell me who you are. Run git config ..." on
making changes
+Level: 1
+Component: wato
+Class: fix
+Compatible: compat
+State: unknown
+Version: 1.2.7i3
+Date: 1438079275
+
+At least on Ubuntu 15.04 a user/mail had to be configured in the git repository. Even
+when the single changes of the users do set an own author.
diff --git a/ChangeLog b/ChangeLog
index 79bca0d..b3cf5cf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -132,6 +132,7 @@
* 2467 FIX: Fixed encoding exception occuring in localized GUI when a WATO action
triggers an error message...
* 2407 FIX: WATO master/slave replication: fixed problem where the configuration from
the master site was not activate on slave site...
* 2474 FIX: Fixed possible corruption of user datasets (contact, mail, rbn
config)...
+ * 2499 FIX: Git: Fixed message "Please tell me who you are. Run git config
..." on making changes...
Notifications:
* 2478 Integrated notification plugin for mobile phone push messages via Pushover...
diff --git a/web/htdocs/wato.py b/web/htdocs/wato.py
index 4ca4127..05a918e 100644
--- a/web/htdocs/wato.py
+++ b/web/htdocs/wato.py
@@ -392,6 +392,12 @@ def do_git_commit():
if not os.path.exists(git_dir):
git_command(["init"])
+ # Set git repo global user/mail. seems to be needed to prevent warning message
+ # on at least ubuntu 15.04: "Please tell me who you are. Run git config
..."
+ # The individual commits by users override the author on their own
+ git_command(["config", "user.email", "check_mk"])
+ git_command(["config", "user.name", "check_mk"])
+
# Make sure that .gitignore-files are present and uptodate
file(defaults.default_config_dir + "/.gitignore",
"w").write("*\n!*.d\n!.gitignore\n*swp\n")
for subdir in os.listdir(defaults.default_config_dir):