Skip to content

Instantly share code, notes, and snippets.

@se7oluti0n
Forked from icantrap/git-proxy.sh
Last active November 8, 2017 08:43
Show Gist options
  • Save se7oluti0n/40bdc363e01d9e83282a73bab0fe2509 to your computer and use it in GitHub Desktop.
Save se7oluti0n/40bdc363e01d9e83282a73bab0fe2509 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