author | Paul Crowley <paul@ciphergoth.org> |
Fri, 18 Apr 2008 10:18:35 +0100 | |
changeset 14 | e7d5254cd0ca |
parent 10 | 524b4a45ef0a |
child 18 | 538d6b198f4a |
permissions | -rwxr-xr-x |
0
41ecb5a3172c
separate out executables and data
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
1 |
#!/bin/sh |
41ecb5a3172c
separate out executables and data
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
2 |
|
10 | 3 |
# This file needs to be saved as ~/hg-ssh-wrapper for the user whose |
4 |
# ~/.ssh/authorized_keys file is rewritten by refresh-auth. It expects |
|
5 |
# to be specified as the target of the "command" section in the prefix |
|
6 |
# of a key in the authorized_keys file, and be passed a name associated |
|
7 |
# with an ssh key as its only argument. It does some setting up before |
|
8 |
# calling hg-ssh, which does the real work of deciding whether to allow |
|
9 |
# the users action based on the type of the action, the key name, and |
|
10 |
# the contents of the specified rules file. |
|
4
dcd195f3e52c
move config out of Python files; don't make hg-ssh-wrapper a dotfile;
Paul Crowley <paul@lshift.net>
parents:
0
diff
changeset
|
11 |
|
10 | 12 |
# If your repository is laid out differently you may need to modify |
13 |
# this file. |
|
4
dcd195f3e52c
move config out of Python files; don't make hg-ssh-wrapper a dotfile;
Paul Crowley <paul@lshift.net>
parents:
0
diff
changeset
|
14 |
|
0
41ecb5a3172c
separate out executables and data
Paul Crowley <paul@lshift.net>
parents:
diff
changeset
|
15 |
set -e |
8
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
16 |
|
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
17 |
# Use a different hgrc for remote pulls - this way you can set |
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
18 |
# up notify for everything at once without affecting local operations |
10 | 19 |
# |
8
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
20 |
# HGRCPATH=$(pwd)/remote-hgrc |
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
21 |
# export HGRCPATH |
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
22 |
|
4
dcd195f3e52c
move config out of Python files; don't make hg-ssh-wrapper a dotfile;
Paul Crowley <paul@lshift.net>
parents:
0
diff
changeset
|
23 |
# Set up this environment variable - useful for hg hooks to check. |
dcd195f3e52c
move config out of Python files; don't make hg-ssh-wrapper a dotfile;
Paul Crowley <paul@lshift.net>
parents:
0
diff
changeset
|
24 |
HG_ACL_USER=$1 |
dcd195f3e52c
move config out of Python files; don't make hg-ssh-wrapper a dotfile;
Paul Crowley <paul@lshift.net>
parents:
0
diff
changeset
|
25 |
export HG_ACL_USER |
8
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
26 |
|
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
27 |
cd repos |
1efc50c61a26
improve hg-ssh-wrapper, suggest HGRCPATH trick
Paul Crowley <paul@lshift.net>
parents:
4
diff
changeset
|
28 |
exec ../admin/hg-admin-tools/hg-ssh hgadmin/hg-ssh-access.conf "$@" |