1 #!/bin/sh |
1 #!/bin/sh |
2 |
2 |
3 # This file needs to be saved as ~/hg-ssh-wrapper for the user whose ~/.ssh/authorized_keys file |
3 # This file needs to be saved as ~/hg-ssh-wrapper for the user whose |
4 # is rewritten by refresh-auth. It expects to be specified as the target of the "command" section |
4 # ~/.ssh/authorized_keys file is rewritten by refresh-auth. It expects |
5 # in the prefix of a key in the authorized_keys file, and be passed a name associated with an |
5 # to be specified as the target of the "command" section in the prefix |
6 # ssh key as its only argument. It does some setting up before calling hg-ssh, which does the real |
6 # of a key in the authorized_keys file, and be passed a name associated |
7 # work of deciding whether to allow the users action based on the type of the action, the key name, |
7 # with an ssh key as its only argument. It does some setting up before |
8 # and the contents of the specified rules file. |
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. |
9 |
11 |
10 # If your repository is laid out differently you may need to modify this file. |
12 # If your repository is laid out differently you may need to modify |
|
13 # this file. |
11 |
14 |
12 set -e |
15 set -e |
13 |
16 |
14 # Use a different hgrc for remote pulls - this way you can set |
17 # Use a different hgrc for remote pulls - this way you can set |
15 # up notify for everything at once without affecting local operations |
18 # up notify for everything at once without affecting local operations |
|
19 # |
16 # HGRCPATH=$(pwd)/remote-hgrc |
20 # HGRCPATH=$(pwd)/remote-hgrc |
17 # export HGRCPATH |
21 # export HGRCPATH |
18 |
22 |
19 # Set up this environment variable - useful for hg hooks to check. |
23 # Set up this environment variable - useful for hg hooks to check. |
20 HG_ACL_USER=$1 |
24 HG_ACL_USER=$1 |