* Pushing to a remote repo from a remote repo?
@ 2012-04-14 22:08 Brian Cardarella
2012-04-14 23:02 ` Carlos Martín Nieto
2012-04-15 10:09 ` Jakub Narebski
0 siblings, 2 replies; 5+ messages in thread
From: Brian Cardarella @ 2012-04-14 22:08 UTC (permalink / raw)
To: git
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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Pushing to a remote repo from a remote repo?
2012-04-14 22:08 Pushing to a remote repo from a remote repo? Brian Cardarella
@ 2012-04-14 23:02 ` Carlos Martín Nieto
2012-04-14 23:16 ` Brian Cardarella
2012-04-15 10:09 ` Jakub Narebski
1 sibling, 1 reply; 5+ messages in thread
From: Carlos Martín Nieto @ 2012-04-14 23:02 UTC (permalink / raw)
To: Brian Cardarella; +Cc: git
[-- Attachment #1: Type: text/plain, Size: 655 bytes --]
On Sat, 2012-04-14 at 18:08 -0400, Brian Cardarella wrote:
> 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?
Using your computer as a proxy and avoiding downloading the information
to your computer are mutually exclusive goals.
At any rate, git doesn't support this kind of operation. If you want to
move data from A to B, you need to push from A or fetch from B (or fetch
from A to C and then push from C to A).
cmn
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Pushing to a remote repo from a remote repo?
2012-04-14 23:02 ` Carlos Martín Nieto
@ 2012-04-14 23:16 ` Brian Cardarella
2012-04-16 14:47 ` Jeff King
0 siblings, 1 reply; 5+ messages in thread
From: Brian Cardarella @ 2012-04-14 23:16 UTC (permalink / raw)
To: Carlos Martín Nieto; +Cc: git
Yes, I assumed the bits need to come through my system. I want to
avoid cloning, pushing, then removing the repo. But it seems that is
not possible. Thank you.
- Brian
On Sat, Apr 14, 2012 at 7:02 PM, Carlos Martín Nieto <cmn@elego.de> wrote:
> On Sat, 2012-04-14 at 18:08 -0400, Brian Cardarella wrote:
>> 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?
>
> Using your computer as a proxy and avoiding downloading the information
> to your computer are mutually exclusive goals.
>
> At any rate, git doesn't support this kind of operation. If you want to
> move data from A to B, you need to push from A or fetch from B (or fetch
> from A to C and then push from C to A).
>
> cmn
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Pushing to a remote repo from a remote repo?
2012-04-14 22:08 Pushing to a remote repo from a remote repo? Brian Cardarella
2012-04-14 23:02 ` Carlos Martín Nieto
@ 2012-04-15 10:09 ` Jakub Narebski
1 sibling, 0 replies; 5+ messages in thread
From: Jakub Narebski @ 2012-04-15 10:09 UTC (permalink / raw)
To: Brian Cardarella; +Cc: git
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Pushing to a remote repo from a remote repo?
2012-04-14 23:16 ` Brian Cardarella
@ 2012-04-16 14:47 ` Jeff King
0 siblings, 0 replies; 5+ messages in thread
From: Jeff King @ 2012-04-16 14:47 UTC (permalink / raw)
To: Brian Cardarella; +Cc: Carlos Martín Nieto, git
On Sat, Apr 14, 2012 at 07:16:36PM -0400, Brian Cardarella wrote:
> Yes, I assumed the bits need to come through my system. I want to
> avoid cloning, pushing, then removing the repo. But it seems that is
> not possible. Thank you.
This isn't really a git problem, but rather a network proxying problem.
You could solve it with netcat and ssh like:
# forward port 5001 on our local box to ssh on the "source" box
nc -lp 5001 -c 'nc $source 22' &
# forward port 5001 on the destination box to our local forward,
# and then start the clone
ssh -R 5001:localhost:5001 $dest \
'git clone ssh://localhost:5001/path/to/repo'
If the repository is accessible by http, then you can easily tweak it to
forward to port 80. If, for some reason, you prefer push rather than
fetch, you can create the tunnels in the reverse direction.
-Peff
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-04-16 14:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-04-14 22:08 Pushing to a remote repo from a remote repo? Brian Cardarella
2012-04-14 23:02 ` Carlos Martín Nieto
2012-04-14 23:16 ` Brian Cardarella
2012-04-16 14:47 ` Jeff King
2012-04-15 10:09 ` Jakub Narebski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).