break-in
author Paul Crowley <paul@lshift.net>
Mon, 16 Jun 2008 17:12:20 +0100
changeset 33 18e93dbdaf12
parent 32 4059dbe9f26a
permissions -rwxr-xr-x
moved stuff into subdirectories
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
31
d54720d47ca2 start to move towards things living where they should and new
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     1
#!/bin/sh
d54720d47ca2 start to move towards things living where they should and new
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     2
d54720d47ca2 start to move towards things living where they should and new
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     3
set -e
d54720d47ca2 start to move towards things living where they should and new
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     4
32
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
     5
user=$(whoami)
31
d54720d47ca2 start to move towards things living where they should and new
Paul Crowley <paul@lshift.net>
parents:
diff changeset
     6
32
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
     7
/usr/local/lib/hg-admin-tools/create-breakin-repository
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
     8
cd hgadmin
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
     9
mkdir -p keys
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
    10
ssh-add -L > keys/$user
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
    11
echo "init user=$user" > hg-ssh-access.conf
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
    12
hg add keys/$user hg-ssh-access.conf
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
    13
hg commit -m "Give all access only to user $user"
4059dbe9f26a new break-in system
Paul Crowley <paul@lshift.net>
parents: 31
diff changeset
    14
hg push