puppet-setproxy/templates/gitproxy.erb
Yolanda Robla caaf33a92f Initial import
Initial commit for puppet-setproxy module

Depends-On: Ib12c282ee3863aba16dbd9ced6ce975e1f572a5c
Change-Id: I199ab36ccb850e9f6a5353feb4bd1946ed2a7eb5
2015-03-25 10:37:47 +01:00

17 lines
561 B
Plaintext

#!/bin/sh
# Use socat to proxy git through an HTTP CONNECT firewall.
# Useful if you are trying to clone git:// from inside a company.
# Requires that the proxy allows CONNECT to port 9418.
#
# Save this file as gitproxy somewhere in your path (e.g., ~/bin) and then run
# chmod +x gitproxy
# git config --global core.gitproxy gitproxy
#
# More details at http://tinyurl.com/8xvpny
# Configuration. Common proxy ports are 3128, 8123, 8000.
_proxy=<%= @http_proxy %>
_proxyport=<%= @proxy_port %>
exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport