Skip to content

Instantly share code, notes, and snippets.

@icantrap
Created October 26, 2010 20:25
Show Gist options
  • Star 10 You must be signed in to star a gist
  • Fork 4 You must be signed in to fork a gist
  • Save icantrap/647722 to your computer and use it in GitHub Desktop.
Save icantrap/647722 to your computer and use it in GitHub Desktop.
How to Github and Gitorious over HTTP proxy

You could always use Smart HTTP.

For read-only (git:) urls, install corkscrew.

  1. Download git-proxy.sh. Put it somewhere and make it executable.

  2. Run git config --global core.gitproxy '/usr/local/bin/git-proxy.sh'

To clone, push, pull over ssh, add the contents of ssh_config to your ~/.ssh/config file.

#!/bin/bash
exec corkscrew 10.10.10.10 8080 $*
Host gitorious.org
Hostname ssh.gitorious.org
Port 443
ProxyCommand corkscrew 10.10.10.10 8080 %h %p
Host github.com
Hostname ssh.github.com
Port 443
ProxyCommand corkscrew 10.10.10.10 8080 %h %p
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment