hg-ssh-wrapper
changeset 4 dcd195f3e52c
parent 0 41ecb5a3172c
child 8 1efc50c61a26
equal deleted inserted replaced
3:7e659a6870de 4:dcd195f3e52c
     1 #!/bin/sh
     1 #!/bin/sh
       
     2 
       
     3 # This file needs to be saved as ~/hg-ssh-wrapper for the user whose ~/.ssh/authorized_keys file
       
     4 # is rewritten by refresh-auth.  It expects to be specified as the target of the "command" section
       
     5 # in the prefix of a key in the authorized_keys file, and be passed a name associated with an
       
     6 # ssh key as its only argument.  It does some setting up before calling hg-ssh, which does the real
       
     7 # work of deciding whether to allow the users action based on the type of the action, the key name,
       
     8 # and the contents of the specified rules file.
       
     9 
       
    10 # If your repository is laid out differently you may need to modify this file.
     2 
    11 
     3 set -e
    12 set -e
     4 cd repos
    13 cd repos
     5 ../admin/hg-admin-tools/hg-ssh "$@"
    14 # Set up this environment variable - useful for hg hooks to check.
       
    15 HG_ACL_USER=$1
       
    16 export HG_ACL_USER
       
    17 ../admin/hg-admin-tools/hg-ssh hgadmin/hg-ssh-access.conf "$@"