Permalink
Browse files

more readme updates

  • Loading branch information...
progrium committed Jan 1, 2013
1 parent 10e87d3 commit 62603d4ec0d4860ca4b42af8d17db395e4edc993
Showing with 23 additions and 4 deletions.
  1. +23 −4 README.md
View
@@ -2,7 +2,8 @@ gitreceive
==========
A tool that sets up a git user that let's you run scripts or hit HTTP
-endpoints when you push code to it.
+endpoints when you push code to it. Build your own Heroku. Push code
+anywhere.
## Requirements
@@ -21,12 +22,17 @@ clone this repo and put `gitreceive` wherever you want.
#### Set up a git user on the server
+This automatically makes a user and home directory if it doesn't exist.
+
$ gitreceive init
Created receiver script in /home/git for user 'git'.
+You can change the user by setting `GITUSER=somethingelse` in the
+environment before using `gitreceive`.
+
#### Modify the receiver script
-By default it will POST all the data to a RequestBin:
+As an example receiver script, it will POST all the data to a RequestBin:
$ cat /home/git/receiver
#!/bin/bash
@@ -45,16 +51,18 @@ The username is just a name associated with a public key. The
fingerprint of the key is sent so you can authenticate against the
public key you might have for that user.
-The repo contents are streamed into `STDIN` as an uncompressed tar archive. You can put them into a directory on the server with a line like this in your receiver script:
+The repo contents are streamed into `STDIN` as an uncompressed archive (tar file). You can extract them into a directory on the server with a line like this in your receiver script:
mkdir -p /some/path && cat | tar -x -C /some/path
#### Create a user by uploading a public key from your laptop
+We just pipe it into the `gitreceive upload-key` command via SSH:
+
$ cat ~/.ssh/id_rsa.pub | ssh you@yourserver.com "gitreceive upload-key progrium"
-The username is just an arbitrary name associated with the key, mostly
+The username argument is just an arbitrary name associated with the key, mostly
for use in your system for auth, etc.
#### Add a remote to a local repository
@@ -77,6 +85,12 @@ The repository `example.git` will be created on the fly when you push.
To git@gittest:progrium/gitreceive.git
59aa541..6eafb55 master -> master
+The receiver script did not attempt to silence the output of curl, so
+the respones of "ok" from RequestBin is shown. Use this to your
+advantage! You can even use chunked-transfer encoding to stream back
+progress in realtime if you kept using HTTP. Alternatively, you can have the
+receiver script run any other script on the server.
+
## So what?
You can use `gitreceive` not only to trigger code, but to provide
@@ -88,6 +102,11 @@ feedback to the user and affect workflow. Use `gitreceive` to:
* Build your own Heroku
* Push code anywhere
+## Contribute
+
+This whole system is contained in a single bash script less than 100
+lines long. Let's keep it simple, but I'm definitely open to contribution!
+
## License
MIT

0 comments on commit 62603d4

Please sign in to comment.