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

Re: git protocol over port-forwarding

From
Julian Phillips <julian@quantumfyre.co.uk>
Date
Mar 14, 2007, 21:05 UTC
Message-ID
<Pine.LNX.4.64.0703142057300.25422@beast.quantumfyre.co.uk>
In-Reply-To
<17912.16608.852664.321837@lisa.zopyra.com>
On Wed, 14 Mar 2007, Bill Lear wrote:
Show 31 quoted lines
> We are attempting to use the git protocol throughout our company, as
> it saves ssh-related problems of permissions and umasks for a our
> poorly-administered community of developers, engineers, and others.
>
> This fails, and I was wondering if anyone has any experience using
> port-forwarding and the git protocol, or if it is not presently
> possible.
>
> Here's how we set things up ("source" is where git-daemon runs,
> and "xiphi" is a client machine):
>
> On the source machine, which is running the git daemon, and listening
> on port 9418, I set up this ssh config entry in my ~/.ssh/config file:
>
> Host xiphi-git
>     Protocol 2
>     ForwardX11 yes
>     Hostname xiphi.lsscorp.com
>     RemoteForward 5700 localhost:9418
>     HostKeyAlias xiphi-git
>
> Then on source, I ssh to xiphi-git, which connects to xiphi and sets up
> a portforwarding from xiphi:9418 back to source:9418.  Then, on xiphi:
>
> xiphi:~/y % git clone git://localhost:5700/fusion
> Initialized empty Git repository in /home/furnish/y/fusion/.git/
> fatal: The remote end hung up unexpectedly
> fetch-pack from 'git://localhost:5700/fusion' failed.
>
> So, we are wondering if perhaps the git daemon could be jiggered to
> work somehow, or if there are other options for us.

I don't think there is anything that needs changing with the git daemon ... or at least I was able to successfully clone over an SSH port forward.

I did get the same error as you originally, but this was due to SSH failing to setup the tunnel connection (checking the logs showed that I had got the hostname in the forward wrong).

-- 
Julian

  ---
<rac> separated by irc networks...i sense a meg ryan movie coming on
Previous: Bill LearNext: Bill Lear
Message 2 of 10 in “git protocol over port-forwarding”
  1. Bill LearMar 14, 2007
  2. Julian PhillipsMar 14, 2007
  3. Bill LearMar 14, 2007
  4. Martin LanghoffMar 14, 2007
  5. Jakub NarebskiMar 14, 2007
  6. Bill LearMar 15, 2007
  7. Bill LearMar 15, 2007
  8. Martin LanghoffMar 15, 2007
  9. Julian PhillipsMar 14, 2007
  10. Martin LanghoffMar 14, 2007

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.