Skip to content

Instantly share code, notes, and snippets.

@david415
Last active November 14, 2015 19:29
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save david415/120f157f62d20b11e39f to your computer and use it in GitHub Desktop.
Save david415/120f157f62d20b11e39f to your computer and use it in GitHub Desktop.
secret onion git http repo! fuck github. no masters. no sys admins. only the secret police know how cool i am.
virtualenv virtenv-txtorcon
. ./virtenv-txtorcon/bin/activate
pip install txtorcon
export project=myproject
export secret=`pwgen 64`
mkdir -p public_html/$secret
cp -a $project public_html/$secret
touch public_html/index.html
cd public_html/$secret
git clone --bare $project $project.git
cd $project.git/
git --bare update-server-info
mv hooks/post-update.sample hooks/post-update
cd ~
## start the web-server...
twistd web --port onion:80 --path ~/public_html
## tail -f twistd.log
### look for your new onion address
### construct your new url.
### as a client you can clone the onion git repo like this:
export gitonion=ae2za2xun3dy2qab.onion
git clone http://$gitonion:80/$secret/$project.git
### or set a new remote and fetch or pull!
git remote add onion123 http://$gitonion:80/$secret/$project.git
git fetch onion123
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment