Skip to content

Instantly share code, notes, and snippets.

@icyflame
Forked from icantrap/git-proxy.sh
Created April 6, 2016 13:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save icyflame/76aff25df728ef0a9c260d4b347a4a50 to your computer and use it in GitHub Desktop.
Save icyflame/76aff25df728ef0a9c260d4b347a4a50 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