8000 GitHub - dsmith/git-pull-hook: A Sinatra app that takes github's post-receive-hook and git pulls to the local repo.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

dsmith/git-pull-hook

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

git-pull-hook

This is a Sinatra simple app that accepts POST requests from GitHub post-receive-hooks and performs a git pull origin master in the corresponding local git repository.

Work in Progress

This is just a quick and dirty hack, and it sure has security issues. I’d appreciate your feedback, please fork it and send me a pull-request in github.

Copyright and Legal Stuff

Who cares? This is under the WTFPL and it was originally coded by Alcides Fonseca

Short Guide

Well, first of all you need ssh access to a webserver where your copy of your github rep 57FE o will live in.

Requirements:

  • Git (DUH!)
  • Ruby
  • gem install sinatra yaml json

Now you should ssh into the server and generate a public/private pair of keys, without pass-phrase: ssh-keygen

Now copy the content of your public key (cat .ssh/id_rsa.pub) and paste it as a new Deploy key in your github admin panel.

Now create a folder to host all your repositories. Mine is ~/git/ and save it for later. The clone your github repository.

Now you should deploy this sinatra app. Since I use dreamhost, I followed this instructions

Remember to edit repos.yml with the folder that host all your git repos, and the pair of remote: local repository names. (Probably the same.) Your remote name can be found in http://github.com/username/remote/ and your local name is the folder that contains your git repo.

Now go to Github admin panel, and add a new webhook service with the URL your sinatra app lives in.

And that’s it!

About

A Sinatra app that takes github's post-receive-hook and git pulls to the local repo.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 95.7%
  • Shell 4.3%
0