git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Access to git repository through squid proxy: The remote end hung up unexpectedly

From
MPMathieu Peltier <mathieu.peltier@gmail.com>
Date
Dec 10, 2011, 08:56 UTC
Message-ID
<CACjeFCA4h_w2UmYywMBV_P+YZcWAE=zRUz-z5eTfAO+oxWKPjw@mail.gmail.com>

Hi, I am trying to access a git repository (git:// URL) through a squid proxy.

squid allows CONNECT for port 9418: $ more /etc/squid/squid.conf ... acl password proxy_auth REQUIRED acl git_port port 9418 ... http_access allow CONNECT git_port password http_access deny CONNECT !SSL_ports

The proxy server can connect to git server : $ telnet git.server.org 9418 Trying w.x.y.z... Connected to git.server.org. Escape character is '^]'.

Here is the error I get on the client side: $ git config --list core.gitproxy=gitproxy.sh

$ more ~/bin/gitproxy.sh #!/bin/sh PROXY=x.domain.org PROXYPORT=8080 PROXYAUTH=user:pass DEBUG="-d -d -d -d" exec socat $DEBUG - PROXY:$PROXY:$1:$2,proxyport=$PROXYPORT,proxyauth=$PROXYAUTH

$ git clone git://git.server.org/gitroot/repo/repo Initialized empty Git repository in /tmp/GIT/repo/.git/ ... 2011/12/09 12:22:44 socat[21428] D socat version 1.7.1.3 on Aug 23 2010 23:26:54 2011/12/09 12:22:44 socat[21428] D setenv("SOCAT_VERSION", "1.7.1.3", 1) ... 2011/12/09 12:22:44 socat[21428] D running on Linux version #1 SMP Tue Mar 23 09:47:08 UTC 2010, release x.y 2011/12/09 12:22:44 socat[21428] D argv[0]: "socat" 2011/12/09 12:22:44 socat[21428] D argv[1]: "-d" 2011/12/09 12:22:44 socat[21428] D argv[2]: "-d" 2011/12/09 12:22:44 socat[21428] D argv[3]: "-d" 2011/12/09 12:22:44 socat[21428] D argv[4]: "-d" 2011/12/09 12:22:44 socat[21428] D argv[5]: "-" 2011/12/09 12:22:44 socat[21428] D argv[6]: "PROXY:x.domain.org:git.server.org:9418,proxyport=8080,proxyauth=user:pass" ... 2011/12/09 12:22:44 socat[21428] I setting option "proxyport" to "8080" 2011/12/09 12:22:44 socat[21428] I setting option "proxy-authorization" to "user:pass" ... 2011/12/09 12:22:44 socat[21428] I sending "CONNECT git.server.org:9418 HTTP/1.0\r\n" ... 2011/12/09 12:22:44 socat[21428] I proxy_connect: received answer "HTTP/1.1 403 OK\r\n" 2011/12/09 12:22:44 socat[21428] E CONNECT git.server.org:9418: OK 2011/12/09 12:22:44 socat[21428] N exit(1) 2011/12/09 12:22:44 socat[21428] I shutdown(3, 2) 2011/12/09 12:22:44 socat[21428] D shutdown() -> 0 fatal: The remote end hung up unexpectedly

I tried to use also nc but I get the same error. Any advice? Thanks in advance, Mathieu

Next: Konstantin Khomoutov
Message 1 of 5 in “Access to git repository through squid proxy: The remote end hung up unexpectedly”
  1. Mathieu PeltierDec 10, 2011
  2. Konstantin KhomoutovDec 10, 2011
  3. Mathieu PeltierDec 10, 2011
  4. Konstantin KhomoutovDec 10, 2011
  5. Mathieu PeltierDec 12, 2011

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.