Fork me on GitHub
Subscribe to RSS Feed

Kit Plummer
Software Engineer :: Techitect :: Evangelist
kitplummer@gmail.com
kitplummer (AIM,Yahoo!IM,Gtalk,Skype)

To the top »

Please share:

I have a couple of “customer” projects hosted at GitHub – which are restricted to Private access. GitHub does a excellent job of utilizing SSH keys to manage developer access, based on each computer that requires access.

But, I need a way to provide “local” access to development and deployment code. One of my projects involves mass deployment of the software to many platforms (as many as 500 at a time). So…I obviously need to optimize the fetch/deploy workflow to accommodate.

What I’ve done is fairly simple, and has been documented under other use cases. This is just my spin on it.

Start with “cloning” the GitHub repository to a local working copy:

$ git clone git@github.com:kitplummer/private.git

Since, my development machines are Macs I can use the built-in Web Sharing feature to expose a web-accessible remote shared environment.

$ mkdir ~/Sites/shared.git; cd ~/Sites/shared.git
$ git —bare init
$ git remote add shared ~/Sites/shared.git

Now, I need to “push” my working copy into the newly created shared repo:

$ cd [location of private.git repo]
$ git push shared master

There’s one simple step required to make the shared repo available (from the webserver):

$ cd ~/Sites/shared.git
$ git-update-server-info

And, voila. There are some hook tricks which I don’t necessarily want. I’m choosing to just manually push the current working copy to the shared environment whenever necessary for deployment.

To get the repo from the webserver: http://localhost/~[kplummer]/shared.git


Please comment:
blog comments powered by Disqus