Skip to content
Browse files

gitosis recipe; tested a little bit

  • Loading branch information...
0 parents commit f833c2ff54f7859bd4b2c4aafb3b8959c787f9e6 @jpetazzo committed Sep 26, 2011
Showing with 48 additions and 0 deletions.
  1. +27 −0 README.rst
  2. +2 −0 dotcloud.yml
  3. +18 −0 postinstall
  4. +1 −0 requirements.txt
27 README.rst
@@ -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 dotcloud.yml
@@ -0,0 +1,2 @@
+www:
+ type: python
18 postinstall
@@ -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 requirements.txt
@@ -0,0 +1 @@
+git+git://github.com/jpetazzo/gitosis.git#egg=gitosis

0 comments on commit f833c2f

Please sign in to comment.
Something went wrong with that request. Please try again.