gitreceived
An SSH server made specifically for accepting git pushes that will trigger an auth script and then a receiver script to handle the push.
This is a more advanced, standalone version of gitreceive.
Building gitreceived
gitreceived is part of Flynn, but if you want to build it as a standalone binary, make sure you have Godep installed and accessible in your path; ensure $GOPATH is set to something (e.g. your home), then you can something like this (tune at your preference):
git clone https://github.com/flynn/gitreceived
cd gitreceived
GOPATH=`pwd` godep go build -o ./gitreceived
Using gitreceived
Usage: ./gitreceived [options] <privatekey> <authchecker> <receiver>
-n=false: disable client authentication
-p="22": port to listen on
-r="/tmp/repos": path to repo cache
privatekey
is the path to the server's private key (unencrypted).
authchecker
is a path to an executable that will check if the push is authorized, and exit with status 0 if it is. It will be called with the following arguments:
authchecker $USER $PATH $KEY
$USER
is the username that was provided to the server.
$PATH
is the path of the repo that was pushed to. It will not contain slashes.
$KEY
is the public key that was provided to the server.
The receiver
is a path to an executable that will handle the push. It will get a tar stream of the repo via stdin and the following arguments:
receiver $PATH $COMMIT
$PATH
is the path of the repo that was pushed to. It will not contain slashes.
$COMMIT
is the SHA of the commit that was pushed to master.
TODO
- Write tests.
- Allow authchecker to return JSON including receiver environment.
- Support RPC as an option for authchecker.
Flynn
Flynn is a modular, open source Platform as a Service (PaaS).
If you're new to Flynn, start here.
Status
Flynn is in active development and currently unsuitable for production use.
Users are encouraged to experiment with Flynn but should assume there are stability, security, and performance weaknesses throughout the project. This warning will be removed when Flynn is ready for production use.
Please report bugs as issues on the appropriate repository. If you have a general question or don't know which repo to use, report them here.
Contributing
We welcome and encourage community contributions to Flynn.
Since the project is still unstable, there are specific priorities for development. Pull requests that do not address these priorities will not be accepted until Flynn is production ready.
Please familiarize yourself with the Contribution Guidelines and Project Roadmap before contributing.
There are many ways to help Flynn besides contributing code:
- Fix bugs or file issues
- Improve the documentation including this website
- Contribute financially to support core development
Flynn is a trademark of Apollic Software, LLC.