You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2018/07/18 12:26:42 UTC

[sling-site] branch master updated: Document publishing when user.useConfigOnly is true

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-site.git


The following commit(s) were added to refs/heads/master by this push:
     new 5556baf  Document publishing when user.useConfigOnly is true
5556baf is described below

commit 5556baf57253b9fbf1dd589a29694cb0913b6175
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Wed Jul 18 14:26:28 2018 +0200

    Document publishing when user.useConfigOnly is true
---
 README.md | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/README.md b/README.md
index 7dba4d9..f127991 100644
--- a/README.md
+++ b/README.md
@@ -52,3 +52,21 @@ It's sometimes useful to ~~steal ideas~~ get inspiration from other projects usi
 To find broken links use
 
     wget --spider -r -nd -nv -l 5 http://localhost:8820/ 2>&1 | grep -B1 'broken link'
+
+## Deploying when git is configured with user.useConfigOnly = true
+
+It it possible to configure git to not inherit or infer the `user.name` and `user.email`
+properties, to avoid the situation where an incorrect value is used.
+
+However, this breaks site publishing as the git checkout no longer inherits the global
+configuration settings. To still be able to publish, the following steps are needed
+
+    mvn package -Ppublish-site -Dmsg="your-msg-here"
+    cd target/scm-checkout
+    git config user.email user@apache.org
+    mvn package -Ppublish-site -Dmsg="your-msg-here"
+
+We are publishing the site once, which creates the SCM checkout, and fails to push
+since no `user.email` config is set. Then we manually configure this property in
+the SCM checkout and try publishing again. Be careful to avoid any `clean` operations
+with Maven since it will erase the initial checkout.