Created
January 20, 2009 02:30
-
-
Save sit/49288 to your computer and use it in GitHub Desktop.
A simple wrapper around socat to use as a git proxy command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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=proxy.yourcompany.com | |
_proxyport=3128 | |
exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport |
where do I save the file gitproxy-socat
?
Found the answser:
http://www.emilsit.net/blog/archives/how-to-use-the-git-protocol-through-a-http-connect-proxy/
another simple workaround (src) :
git config --global url.https://github.com/.insteadOf git://github.com/
@boly38 super great workaround for github repos!
shouldn't it be "$_user" and "$_passwd" in exec line @cuongitbk
another simple workaround (src) :
git config --global url.https://github.com/.insteadOf git://github.com/
Nice solution!
it doesn't work on my machine. I still need to set ~/.ssh/config.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I found that there is a parameter for authentication:
You can try: