Because of the recent ruby/rails security scares I wanted to move our private github repository to a more secure location that is only accessible by our small team via ssh keys on an unknown port. It's worth remembering that private repos on github are not encrypted, and so are only as safe as the ruby/network layer that wraps it. To be fair, private repos were never advertised as secure storage, despite being used that way.
This is a huge 'if', but /if/ github is compromised not only will your sourcecode stand a high chance of being exposed (commercial damage, elevated risk of XSS & SQL injection), but your web applications may also be vulnerable to session spoofing in addition to possibly granting access via API keys and passwords to the usual range of external APIs, probably including commercial ones. We all code in a secure way, but who wants to have that tested in public?
You can setup a git repository on a server on the internet of your choosing that will allow you to continue sharing commits and deploying as normal. You can then remove sensitive information from your repo at your own pace, and, once the rubypocalypse is over, you can always migrate your code back to github if you wish.
Config remote git server and push code there + update your local gits to use the new remote location
http://tumblr.intranation.com/post/766290565/how-set-up-your-own-private-git-server-linux
update your capistrano deploy scripts
As long as you have key based auth over ssh between your servers, it's as simple as updating your cap scripts:
set :repository, "[your ssh user]@[your server]:[your relative path to git repo]"
backup your github issues & delete your github private repo
https://gist.github.com/2369729 (I used this. it worked well. Not sure if I can roundtrip them)
YMMV
If you still want Github-like functionality then look at the free and open-source Gitlab: http://gitlab.org/
We use it at Esri and so far it's been nice to have internally and the optionally to still push things public to Github.