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

Re: Pushing to a remote repo from a remote repo?

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 15, 2012, 10:09 UTC
Message-ID
<m3lilx9uhf.fsf@localhost.localdomain>
In-Reply-To
<CAAnwhhWTcfOi+qqXPnGNXSKHbFh5L=+6eSKaaex5mq6VTwSxEw@mail.gmail.com>
Brian Cardarella <brian@dockyard.com> writes:
> So I have a destination repo that is remote. And I have a source repo
> that is also remote. I would like my local machine to act as a proxy
> to allow me to push to the destination from the source without ever
> download the repo to my machine. Is this possible?

First, you can set up either SSH tunnel (for SSH transport), or HTTP proxy (`http_proxy`[1] environment variable or `http.proxy` config variable[2] for HTTP transport, both smart and dumb), or git proxy (`core.gitproxy`, e.g. netcat or ssh, for git:// protocol)

Second, you can configure repository using hooks so that pushing to said intermediate repository would push to destination repository. In this solution you would have repository on disk on intermediate machine, but you can avoid manual transfer to and from intermediate machine.

[1] curl(1) manpage, the "Environment" section [2] git-config(1) manpage

HTH
-- 
Jakub Narebski
Previous: Jeff King
Message 5 of 5 in “Pushing to a remote repo from a remote repo?”
  1. Brian CardarellaApr 14, 2012
  2. Carlos Martín NietoApr 14, 2012
  3. Brian CardarellaApr 14, 2012
  4. Jeff KingApr 16, 2012
  5. Jakub NarebskiApr 15, 2012

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.