Bernd Wurst commited on 2018-12-07 22:19:27
Zeige 8 geänderte Dateien mit 24 Einfügungen und 17 Löschungen.
... | ... |
@@ -16,12 +16,12 @@ Nevertheless, in case you use a significant part of this code, we ask (but not r |
16 | 16 |
|
17 | 17 |
require_role(ROLE_SYSTEMUSER); |
18 | 18 |
|
19 |
-$data_dir = realpath(dirname(__FILE__).'/../data/'); |
|
19 |
+$data_dir = realpath(dirname(__FILE__).'/../../../../gitolite-data/'); |
|
20 | 20 |
$config_file = $data_dir.'/gitolite-admin/conf/webinterface.conf'; |
21 | 21 |
$config_dir = $data_dir.'/gitolite-admin/conf/webinterface'; |
22 | 22 |
$key_dir = $data_dir.'/gitolite-admin/keydir'; |
23 | 23 |
DEBUG("gitolite-data_dir: ".$data_dir); |
24 |
-$git_wrapper = $data_dir . '/git-wrapper.sh'; |
|
24 |
+$git_wrapper = realpath(dirname(__FILE__).'/../scripts/git-wrapper.sh'); |
|
25 | 25 |
|
26 | 26 |
|
27 | 27 |
|
... | ... |
@@ -0,0 +1 @@ |
1 |
+Require all denied |
... | ... |
@@ -1,22 +1,24 @@ |
1 | 1 |
#!/bin/bash |
2 | 2 |
|
3 |
-if [ -f "sshkey" ] ; then |
|
3 |
+SCRIPTDIR="$(realpath "$(dirname ${0})")" |
|
4 |
+WORKDIR="$(realpath "$SCRIPTDIR/../../../../gitolite-data")" |
|
5 |
+ |
|
6 |
+if [ -f "$WORKDIR/sshkey" ] ; then |
|
4 | 7 |
echo 'SSH-Key exists!' |
5 | 8 |
exit 1 |
6 | 9 |
fi |
7 | 10 |
|
8 |
-WORKDIR="$(realpath "$(dirname ${0})")" |
|
9 |
- |
|
10 | 11 |
ssh-keygen -t ecdsa -P '' -f "${WORKDIR}/sshkey" |
11 | 12 |
|
12 | 13 |
echo 'Paste the following public key in gitolite-config and allow it to access the gitolite-admin repository!' |
13 | 14 |
echo '----------------------' |
14 |
-cat sshkey.pub |
|
15 |
+cat "$WORKDIR/sshkey.pub" |
|
15 | 16 |
echo '----------------------' |
16 | 17 |
echo -n 'Press ENTER when ready...' |
17 | 18 |
read |
18 | 19 |
|
19 |
-export GIT_SSH="${WORKDIR}/ssh-wrapper.sh" |
|
20 |
+export GIT_SSH="$SCRIPTDIR/ssh-wrapper.sh" |
|
21 |
+cd "$WORKDIR" |
|
20 | 22 |
git clone "git@git.$(hostname -d):gitolite-admin" |
21 | 23 |
|
22 | 24 |
cd "gitolite-admin" |