summaryrefslogtreecommitdiff
path: root/roles/gitserver/files
diff options
context:
space:
mode:
Diffstat (limited to 'roles/gitserver/files')
-rw-r--r--roles/gitserver/files/gitolite.rc21
-rw-r--r--roles/gitserver/files/restore-backup.sh14
2 files changed, 35 insertions, 0 deletions
diff --git a/roles/gitserver/files/gitolite.rc b/roles/gitserver/files/gitolite.rc
new file mode 100644
index 0000000..6b65a8b
--- /dev/null
+++ b/roles/gitserver/files/gitolite.rc
@@ -0,0 +1,21 @@
+%RC = (
+ UMASK => 0022,
+ GIT_CONFIG_KEYS => '',
+ LOG_EXTRA => 1,
+ ROLES => {
+ READERS => 1,
+ WRITERS => 1,
+ },
+ ENABLE => [
+ 'help',
+ 'desc',
+ 'info',
+ 'perms',
+ 'writable',
+ 'ssh-authkeys',
+ 'git-config',
+ 'daemon',
+ 'cgit',
+ ],
+);
+1;
diff --git a/roles/gitserver/files/restore-backup.sh b/roles/gitserver/files/restore-backup.sh
new file mode 100644
index 0000000..8fc0de5
--- /dev/null
+++ b/roles/gitserver/files/restore-backup.sh
@@ -0,0 +1,14 @@
+#!/bin/sh -e
+
+cd old-repositories
+for repo in *.git; do
+ if [ x"$repo" = x"gitolite-admin.git" ]; then
+ continue;
+ fi
+
+ cd $repo
+ if [ $(git branch | wc -l) -ne 0 ]; then
+ gitolite push --mirror "../../repositories/$repo"
+ fi
+ cd ..
+done