aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorRafael G. Martins <rafael@rafaelmartins.eng.br>2016-10-10 02:13:47 +0200
committerRafael G. Martins <rafael@rafaelmartins.eng.br>2016-10-10 02:13:47 +0200
commit3cd3dcb5bb3b0481812ddd3ff8dc182bdb20be23 (patch)
treed99f57f85d2472caf334a4b96fbebd95cee873f7 /man
parent62f999141701ba915a035a11cbac7fc7ddb08f31 (diff)
downloadblogc-3cd3dcb5bb3b0481812ddd3ff8dc182bdb20be23.tar.gz
blogc-3cd3dcb5bb3b0481812ddd3ff8dc182bdb20be23.tar.bz2
blogc-3cd3dcb5bb3b0481812ddd3ff8dc182bdb20be23.zip
git-receiver: added support to get mirror url from config file
this commit also includes some "integration test" in shell script
Diffstat (limited to 'man')
-rw-r--r--man/blogc-git-receiver.1.ronn21
1 files changed, 17 insertions, 4 deletions
diff --git a/man/blogc-git-receiver.1.ronn b/man/blogc-git-receiver.1.ronn
index dc35621..806ba3d 100644
--- a/man/blogc-git-receiver.1.ronn
+++ b/man/blogc-git-receiver.1.ronn
@@ -63,9 +63,7 @@ After running these commands, the machine is ready to be used.
## REPOSITORY MIRRORING
Users can rely on `blogc-git-receiver` to mirror repositories to a remote Git
-repository (e.g. a free Bitbucket private repository). This feature just requires
-adding a remote called `mirror` to the bare repository in the server. If such remote
-exists, `blogc-git-receiver` will `git push --mirror` to it.
+repository (e.g. a free Bitbucket private repository).
Please note that the `blogc` user must be able to push to the remote repository, and
that any content manually pushed to the remote repository is overwritten by
@@ -83,7 +81,20 @@ means that if an error happens when mirroring the repository, the deploy will st
succeed. Users should pay attention to the git hook logs, to avoid losing data
due to repositories not being mirrored.
-To add the `mirror` remote:
+This feature just requires adding a remote called `mirror` to the bare repository
+in the server, or creating a configuration file (~/blogc-git-receiver.ini), that is
+a simple INI-style file where each repository is represented by a section and the
+value of the `mirror` variable is the URL that should be used to push.
+
+To create the configuration file (recommended):
+
+ # su -s /bin/bash - blogc
+ # cat > ~/blogc-git-receiver.ini <<EOF
+ [repo:myblog.git]
+ mirror=$YOUR_GIT_MIRROR_URL
+ EOF
+
+Or to add the `mirror` remote:
# su -s /bin/bash - blogc
$ cd repos
@@ -91,6 +102,8 @@ To add the `mirror` remote:
$ cd myblog.git
$ git remote add --mirror=push mirror $YOUR_GIT_MIRROR_URL
+Both examples assume that your repository is named `myblog.git`.
+
### Caveats of repository mirroring with SSH
The authentication must be done with a password-less SSH key created by the `blogc`