Skip to content

Commit

Permalink
gitosis recipe; tested a little bit
Browse files Browse the repository at this point in the history
  • Loading branch information
jpetazzo committed Sep 26, 2011
0 parents commit f833c2f
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Gitosis on DotCloud
===================

Quick setup::

git clone git://github.com/jpetazzo/gitosis-on-dotcloud
git push gito6 gitosis-on-dotcloud
dotcloud run gito6.www cat /home/dotcloud/data/id_rsa > key
chmod 600 key
ssh-add key
GITCLOUD="$(dotcloud info gito6.www | grep ssh:// | awk '{print $2}')"

And now you can do e.g.::

git clone $GITCLOUD/gitosis-admin
cd gitosis-admin
cat >>gitosis.conf <<EOF
[group foo]
writable = foo
members = @all
EOF
git commit -a -m 'add project foo'
git push
cd /some/git/repository
git remote add gitosis $GITCLOUD/foo
git push gitosis master

2 changes: 2 additions & 0 deletions dotcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
www:
type: python
18 changes: 18 additions & 0 deletions postinstall
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh
[ -d /home/dotcloud/data ] || {
mkdir -p /home/dotcloud/data
ssh-keygen -f /home/dotcloud/data/id_rsa -N ''
gitosis-init < /home/dotcloud/data/id_rsa.pub
mv /home/dotcloud/repositories /home/dotcloud/data/repositories
ln -s /home/dotcloud/data/repositories /home/dotcloud/repositories
mv /home/dotcloud/gitosis /home/dotcloud/data/gitosis
ln -s /home/dotcloud/data/gitosis /home/dotcloud/gitosis
APPNAME=$(grep DOTCLOUD_PROJECT /home/dotcloud/environment.json |
cut -d\" -f4)
SVCNAME=$(grep DOTCLOUD_SERVICE_NAME /home/dotcloud/environment.json |
cut -d\" -f4)
}
echo "*******************************************************************"
echo "To retrieve the SSH private key for your gitosis service, run:"
echo "dotcloud run $APPNAME.$SVCNAME cat /home/dotcloud/data/id_rsa"
echo "*******************************************************************"
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
git+git://github.com/jpetazzo/gitosis.git#egg=gitosis

0 comments on commit f833c2f

Please sign in to comment.