git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* git clone problem through HTTP
@ 2007-04-20  7:15 Aubrey Li
  2007-04-20 11:48 ` Julian Phillips
  2007-04-20 21:02 ` Junio C Hamano
  0 siblings, 2 replies; 11+ messages in thread
From: Aubrey Li @ 2007-04-20  7:15 UTC (permalink / raw)
  To: git

I'm behind of a firewall on which the git port is not permitted, so I
can only use http protocol. Unfortunately, I can't clone linus' git
tree at all. I've tried

git version 1.4.4.2
git version 1.4.4.4
git version 1.5.0.1
git version 1.5.0.4
git version 1.5.0.6
git version 1.5.1.1,

none of them work. The following is the error.
===================================
aubrey@Debian:~/upstream-kernel$ git --version
git version 1.5.1.1

aubrey@Debian:~/upstream-kernel$ git-clone
http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
linux-2.6
----snip----
walk b188ffe876382ecc009ceb4fe033fd6ec7ba4ede
walk 0964ce24d091a1d3dc7f667e1b107ab77d4325e6
walk c264852726dde251a0c09ec22f61a9be8b0db68b
walk 69903d6500c73af8329a5fba7153b0d50748981c
walk b59a9504cb93db7fae31e60760725d48652a1fc3
error: Couldn't get
http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/refs/tags/v2.6.11
for tags/v2.6.11
The requested URL returned error: 404
error: Could not interpret tags/v2.6.11 as something to pull
==================================

I also tried other mirrors like www1.kernel.org, www2.kernel.org, they
don't work, either.
I really appreciate any help, thanks!

-Aubrey

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20  7:15 git clone problem through HTTP Aubrey Li
@ 2007-04-20 11:48 ` Julian Phillips
  2007-04-20 13:01   ` Medve Emilian-EMMEDVE1
  2007-04-20 13:38   ` Aubrey Li
  2007-04-20 21:02 ` Junio C Hamano
  1 sibling, 2 replies; 11+ messages in thread
From: Julian Phillips @ 2007-04-20 11:48 UTC (permalink / raw)
  To: Aubrey Li; +Cc: git

On Fri, 20 Apr 2007, Aubrey Li wrote:

> I'm behind of a firewall on which the git port is not permitted, so I
> can only use http protocol. Unfortunately, I can't clone linus' git
> tree at all.

Linus packs his refs, which means that currently you can't clone using 
http, with any version of git.

Try http://repo.or.cz/r/linux-2.6.git/ instead?  This appears to be a 
straight clone, but without packed refs.

-- 
Julian

  ---
Go out and tell a lie that will make the whole family proud of you.
 		-- Cadmus, to Pentheus, in "The Bacchae" by Euripides

^ permalink raw reply	[flat|nested] 11+ messages in thread

* RE: git clone problem through HTTP
  2007-04-20 11:48 ` Julian Phillips
@ 2007-04-20 13:01   ` Medve Emilian-EMMEDVE1
  2007-04-20 13:38   ` Aubrey Li
  1 sibling, 0 replies; 11+ messages in thread
From: Medve Emilian-EMMEDVE1 @ 2007-04-20 13:01 UTC (permalink / raw)
  To: git

Hi Aubery,


If you have a SOCKS server somewhere you could use socksify to get a
clone with the git native protocol.


Cheers,
Emil.


-----Original Message-----
From: git-owner@vger.kernel.org [mailto:git-owner@vger.kernel.org] On
Behalf Of Julian Phillips
Sent: Friday, April 20, 2007 6:48 AM
To: Aubrey Li
Cc: git@vger.kernel.org
Subject: Re: git clone problem through HTTP

On Fri, 20 Apr 2007, Aubrey Li wrote:

> I'm behind of a firewall on which the git port is not permitted, so I
> can only use http protocol. Unfortunately, I can't clone linus' git
> tree at all.

Linus packs his refs, which means that currently you can't clone using 
http, with any version of git.

Try http://repo.or.cz/r/linux-2.6.git/ instead?  This appears to be a 
straight clone, but without packed refs.

-- 
Julian

  ---
Go out and tell a lie that will make the whole family proud of you.
 		-- Cadmus, to Pentheus, in "The Bacchae" by Euripides

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20 11:48 ` Julian Phillips
  2007-04-20 13:01   ` Medve Emilian-EMMEDVE1
@ 2007-04-20 13:38   ` Aubrey Li
  2007-04-20 13:59     ` Alex Riesen
  2007-04-20 14:01     ` Brian Gernhardt
  1 sibling, 2 replies; 11+ messages in thread
From: Aubrey Li @ 2007-04-20 13:38 UTC (permalink / raw)
  To: Julian Phillips; +Cc: git

On 4/20/07, Julian Phillips <julian@quantumfyre.co.uk> wrote:
> On Fri, 20 Apr 2007, Aubrey Li wrote:
>
> > I'm behind of a firewall on which the git port is not permitted, so I
> > can only use http protocol. Unfortunately, I can't clone linus' git
> > tree at all.
>
> Linus packs his refs, which means that currently you can't clone using
> http, with any version of git.

I really don't understand why packed refs or not depend on the protocol.
It doesn't make any sense.
>
> Try http://repo.or.cz/r/linux-2.6.git/ instead?  This appears to be a
> straight clone, but without packed refs.

Does git support to update working copy to a different URL? for
example, I clone the repo through GIT, and switch the working copy to
HTTP, is it possible?
Or clone it from http://repo.or.cz/r/linux-2.6.git, and switch it to
www.kernel.org?

-Aubrey

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20 13:38   ` Aubrey Li
@ 2007-04-20 13:59     ` Alex Riesen
  2007-04-20 14:01     ` Brian Gernhardt
  1 sibling, 0 replies; 11+ messages in thread
From: Alex Riesen @ 2007-04-20 13:59 UTC (permalink / raw)
  To: Aubrey Li; +Cc: Julian Phillips, git

On 4/20/07, Aubrey Li <aubreylee@gmail.com> wrote:
> On 4/20/07, Julian Phillips <julian@quantumfyre.co.uk> wrote:
> > On Fri, 20 Apr 2007, Aubrey Li wrote:
> >
> > > I'm behind of a firewall on which the git port is not permitted, so I
> > > can only use http protocol. Unfortunately, I can't clone linus' git
> > > tree at all.
> >
> > Linus packs his refs, which means that currently you can't clone using
> > http, with any version of git.
>
> I really don't understand why packed refs or not depend on the protocol.
> It doesn't make any sense.

It does. And the program you using is currently maintainerless.

> > Try http://repo.or.cz/r/linux-2.6.git/ instead?  This appears to be a
> > straight clone, but without packed refs.
>
> Does git support to update working copy to a different URL? for
> example, I clone the repo through GIT, and switch the working copy to
> HTTP, is it possible?

Yes. Just edit you remote to point somewhere else. Looks for
"remote" in .git/config or .git/remotes/origin.

> Or clone it from http://repo.or.cz/r/linux-2.6.git, and switch it to
> www.kernel.org?

Whatever, works anyway:

$ git clone --reference /home/auli/linux-2.6.git \
http://repo.or.cz/r/linux-2.6.git linux-2.6.or.cz

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20 13:38   ` Aubrey Li
  2007-04-20 13:59     ` Alex Riesen
@ 2007-04-20 14:01     ` Brian Gernhardt
  2007-04-20 14:19       ` Julian Phillips
  1 sibling, 1 reply; 11+ messages in thread
From: Brian Gernhardt @ 2007-04-20 14:01 UTC (permalink / raw)
  To: Aubrey Li; +Cc: Julian Phillips, git


On Apr 20, 2007, at 9:38 AM, Aubrey Li wrote:

> On 4/20/07, Julian Phillips <julian@quantumfyre.co.uk> wrote:
>> On Fri, 20 Apr 2007, Aubrey Li wrote:
>>
>> > I'm behind of a firewall on which the git port is not permitted,  
>> so I
>> > can only use http protocol. Unfortunately, I can't clone linus' git
>> > tree at all.
>>
>> Linus packs his refs, which means that currently you can't clone  
>> using
>> http, with any version of git.
>
> I really don't understand why packed refs or not depend on the  
> protocol.
> It doesn't make any sense.

I think it's simply because git-http-fetch doesn't look for the  
packed-refs file.  Are we actually going to support HTTP fetching?   
If so, we should update it to pull the packed-refs file too.  If not,  
it should be clearly marked as depreciated.  That said, I think HTTP  
is the easiest way for most people to publish and removing it would  
be a mistake.  I'd poke at it, but there's not enough spare time in  
the day at the moment.

~~ Brian

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20 14:01     ` Brian Gernhardt
@ 2007-04-20 14:19       ` Julian Phillips
  0 siblings, 0 replies; 11+ messages in thread
From: Julian Phillips @ 2007-04-20 14:19 UTC (permalink / raw)
  To: Brian Gernhardt; +Cc: Aubrey Li, git

On Fri, 20 Apr 2007, Brian Gernhardt wrote:

>
> On Apr 20, 2007, at 9:38 AM, Aubrey Li wrote:
>
>> On 4/20/07, Julian Phillips <julian@quantumfyre.co.uk> wrote:
>> > On Fri, 20 Apr 2007, Aubrey Li wrote:
>> > 
>> > >  I'm behind of a firewall on which the git port is not permitted, so I
>> > >  can only use http protocol. Unfortunately, I can't clone linus' git
>> > >  tree at all.
>> > 
>> > Linus packs his refs, which means that currently you can't clone using
>> > http, with any version of git.
>> 
>> I really don't understand why packed refs or not depend on the protocol.
>> It doesn't make any sense.
>
> I think it's simply because git-http-fetch doesn't look for the packed-refs 
> file.

Yep.

>  Are we actually going to support HTTP fetching?  If so, we should 
> update it to pull the packed-refs file too.  If not, it should be clearly 
> marked as depreciated.  That said, I think HTTP is the easiest way for most 
> people to publish and removing it would be a mistake.  I'd poke at it, but 
> there's not enough spare time in the day at the moment.

I was hoping to find time to poke this over the weekend ... maybe even 
this evening.

-- 
Julian

  ---
Nature always sides with the hidden flaw.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20  7:15 git clone problem through HTTP Aubrey Li
  2007-04-20 11:48 ` Julian Phillips
@ 2007-04-20 21:02 ` Junio C Hamano
  2007-04-20 21:09   ` Junio C Hamano
  2007-04-20 21:31   ` Junio C Hamano
  1 sibling, 2 replies; 11+ messages in thread
From: Junio C Hamano @ 2007-04-20 21:02 UTC (permalink / raw)
  To: Aubrey Li; +Cc: git

"Aubrey Li" <aubreylee@gmail.com> writes:

> I'm behind of a firewall on which the git port is not permitted, so I
> can only use http protocol. Unfortunately, I can't clone linus' git
> tree at all. I've tried
>
> git version 1.4.4.2
> git version 1.4.4.4
> git version 1.5.0.1
> git version 1.5.0.4
> git version 1.5.0.6
> git version 1.5.1.1,
>
> none of them work. The following is the error.

        $ git init
        $ git remote add origin http://.../linux-2.6.git
	$ git config branch.master.remote origin
	$ git config branch.master.merge refs/heads/master
        $ git fetch
        $ git merge origin

should work, because I knew about this problem and fixed it in
git-fetch in v1.5.0.

Alas, I forgot to update the matching code in git-clone.

This is why I keep saying that we should get rid of as much code
from git-clone, and make it essentially a thin wrapper around
the six commands I quoted above.

---

diff --git a/git-clone.sh b/git-clone.sh
index 513b574..cad5c0c 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -60,7 +60,7 @@ Perhaps git-update-server-info needs to be run there?"
 		else
 			tname=$name
 		fi
-		git-http-fetch $v -a -w "$tname" "$name" "$1" || exit 1
+		git-http-fetch $v -a -w "$tname" "$sha1" "$1" || exit 1
 	done <"$clone_tmp/refs"
 	rm -fr "$clone_tmp"
 	http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD" ||

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20 21:02 ` Junio C Hamano
@ 2007-04-20 21:09   ` Junio C Hamano
  2007-04-20 21:31   ` Junio C Hamano
  1 sibling, 0 replies; 11+ messages in thread
From: Junio C Hamano @ 2007-04-20 21:09 UTC (permalink / raw)
  To: Aubrey Li; +Cc: git

Junio C Hamano <junkio@cox.net> writes:

> "Aubrey Li" <aubreylee@gmail.com> writes:
>
>> I'm behind of a firewall on which the git port is not permitted, so I
>> can only use http protocol. Unfortunately, I can't clone linus' git
>> tree at all. I've tried
>>
>> git version 1.4.4.2
>> git version 1.4.4.4
>> git version 1.5.0.1
>> git version 1.5.0.4
>> git version 1.5.0.6
>> git version 1.5.1.1,
>>
>> none of them work. The following is the error.
>
>         $ git init
>         $ git remote add origin http://.../linux-2.6.git

This step needs to have "add -m master" instead of just "add".

> 	$ git config branch.master.remote origin
> 	$ git config branch.master.merge refs/heads/master
>         $ git fetch
>         $ git merge origin

Otherwise you end up having to say "git merge origin/master" here.

>
> should work, because I knew about this problem and fixed it in
> git-fetch in v1.5.0.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20 21:02 ` Junio C Hamano
  2007-04-20 21:09   ` Junio C Hamano
@ 2007-04-20 21:31   ` Junio C Hamano
  2007-04-22  5:10     ` Aubrey Li
  1 sibling, 1 reply; 11+ messages in thread
From: Junio C Hamano @ 2007-04-20 21:31 UTC (permalink / raw)
  To: Aubrey Li; +Cc: git, Julian Phillips, Alex Riesen, Brian Gernhardt

Junio C Hamano <junkio@cox.net> writes:

> [[manual workaround to make it work with existing tools]]
> ... should work, because I knew about this problem and fixed it in
> git-fetch in v1.5.0.
>
> Alas, I forgot to update the matching code in git-clone.
>
> This is why I keep saying that we should get rid of as much code
> from git-clone, and make it essentially a thin wrapper around
> the six commands I quoted above.
>
> ---
>
> diff --git a/git-clone.sh b/git-clone.sh
> index 513b574..cad5c0c 100755
> --- a/git-clone.sh
> +++ b/git-clone.sh
> @@ -60,7 +60,7 @@ Perhaps git-update-server-info needs to be run there?"
>  		else
>  			tname=$name
>  		fi
> -		git-http-fetch $v -a -w "$tname" "$name" "$1" || exit 1
> +		git-http-fetch $v -a -w "$tname" "$sha1" "$1" || exit 1
>  	done <"$clone_tmp/refs"
>  	rm -fr "$clone_tmp"
>  	http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD" ||

I've applied the above patch on top of 'maint' and it clones
Linus's reopsitory over http just fine.  I will include this fix
in upcoming maintenance release v1.5.1.2.

Thanks for reporting the breakage.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: git clone problem through HTTP
  2007-04-20 21:31   ` Junio C Hamano
@ 2007-04-22  5:10     ` Aubrey Li
  0 siblings, 0 replies; 11+ messages in thread
From: Aubrey Li @ 2007-04-22  5:10 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, Julian Phillips, Alex Riesen, Brian Gernhardt

On 4/21/07, Junio C Hamano <junkio@cox.net> wrote:
> Junio C Hamano <junkio@cox.net> writes:
>
> > [[manual workaround to make it work with existing tools]]
> > ... should work, because I knew about this problem and fixed it in
> > git-fetch in v1.5.0.
> >
> > Alas, I forgot to update the matching code in git-clone.
> >
> > This is why I keep saying that we should get rid of as much code
> > from git-clone, and make it essentially a thin wrapper around
> > the six commands I quoted above.
> >
> > ---
> >
> > diff --git a/git-clone.sh b/git-clone.sh
> > index 513b574..cad5c0c 100755
> > --- a/git-clone.sh
> > +++ b/git-clone.sh
> > @@ -60,7 +60,7 @@ Perhaps git-update-server-info needs to be run there?"
> >               else
> >                       tname=$name
> >               fi
> > -             git-http-fetch $v -a -w "$tname" "$name" "$1" || exit 1
> > +             git-http-fetch $v -a -w "$tname" "$sha1" "$1" || exit 1
> >       done <"$clone_tmp/refs"
> >       rm -fr "$clone_tmp"
> >       http_fetch "$1/HEAD" "$GIT_DIR/REMOTE_HEAD" ||
>
> I've applied the above patch on top of 'maint' and it clones
> Linus's reopsitory over http just fine.  I will include this fix
> in upcoming maintenance release v1.5.1.2.
>
> Thanks for reporting the breakage.
>

Thanks for fixing this issue, but so far I have no chance to verify it.
I cloned the linus' git tree 5 hours ago and it hangs at
"got 345019345f09254292831cb75c6824d826592b09",
Now 5 hours elapsed, it still hangs, no error, no warning as below:
===========================================
aubrey@ubuntu-feisty:~/upstream-kernel$ git-clone
http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
linux-2.6
Initialized empty Git repository in /home/aubrey/upstream-kernel/linux-2.6/.git/
Getting alternates list for
http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
Getting pack list for
http://www.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/
Getting index for pack 25bdaf46d6823b132b076f6e4467d0607876ca66
Getting index for pack d7c8d1a960522394a6aa0b952bae5bb2c3b49deb
Getting index for pack 26e13df8f754e1521ff927b46e47934f2fbbffb6
Getting pack 26e13df8f754e1521ff927b46e47934f2fbbffb6
 which contains 0f851021c0f91e5073fa89f26b5ac68e23df8e11
walk 0f851021c0f91e5073fa89f26b5ac68e23df8e11
walk ea8df8c5e609a53f4d03d133baea9561412f4303
walk 8929fea39cb0ab3e455fe00e7eb6806c32155cd2
Getting pack 25bdaf46d6823b132b076f6e4467d0607876ca66
 which contains 060a71d41ad7ccc3214065a182e6f67568420071
got 234bae68cb98ec1eb6d6ef7d4d5b5a1e912cb7bf
walk 241c39b9ac4bf847013aa06cce6d4d61426a2006
walk 1d464c26b5625215c4b35fb336c8f3c57d248c2e
walk 38b66f8444050c7cdfad759b8b556338e1fcb4da
Getting pack d7c8d1a960522394a6aa0b952bae5bb2c3b49deb
 which contains 66384c580873a1cd270f462024f6f1e855e9fd72
got 0298f016ee23659121cefa271ae66966a64cd424
got 58bd33f6890ceefadb1a7b0075f3fe03b546699d
got a965e259b9fc8fb88c31579b9101dad9a970a7b1
got 56fd03cfe031eab738b7306dd143f16103166235
got b3ee2932815d17c8e4b7c90f245837bd236d761a
got 8549905d926ce8278d46f3152f03105de24e288f
got cd6c1010f011937d4e0d7e36e1d1ba7745546a7b
got 7cf006e71b7778ad859b30b80735ab558f63e7f2
got 3494ea781bf2d0455fa1a94a3c61e6629dacee83
got 244f4a6deb4cf1a6c9f221fe22ee1e41210f975f
got 114e99c6dd853f7f5eb77e2c5f0d6d49bf223d49
got ab1a09ea04b06ba38816528c1091a4bf33759ced
got 9be48827ac233e192db3201d9d634013a8d9ea3b
got ebe3480c6ee1cb422ec4d2cfd9057700406df56c
got 0ae65a338d14f1ab5f31f80b74f2605c855f4fb9
got d2b13fee42dad2216a7913a694e9be154b846c1f
got 019fa5d835565eeaeffcb646fb5eafea1241ca28
got 63f915d3551335374428fd8cb1997598e39e302c
got a1afcc413c0e44361ca1a6a868ed5fb8576813d7
got 891f99feea7ed68bbf74640bfd020cde5d4ecf9b
got cab26f301eab5caed62b1a3dcf8c4c7896b23d8b
got 8dc3bc4f5863dc33ea1832083ef3a6325d896b1f
got 42e9b05e17387374c8aabcdc7d494b3c3e13edbe
got ac36152c68bf1261206e86f5373ff5eac21b09a7
got 2b4c8974f2649242cf946421bc8af83cad47f5b2
got 50cc1700978d2ae577594c6ecd8d2db5f00b9014
got a3d46ea371269d4e0ae069365405389b6443ffb8
got 9f10689905a8d68c3eb7be4b00561c52f7f6ac23
got 656bdb1352d8d8ee44991ecb8e2ca75f0f5b05a6
got e3019d52c30f751533d7ad58abea58fc53ab39d8
got 5efb5afc45baa091eee09138cdf1593cb3d4341c
got b6e0eea1e39e015bcc11da33495a249c06e5f156
got 44aa9b726573b2685d0007c27876b13fe4a5ef2f
got 2877744cb6069439ec60e199d715eb55276fb6fc
got cd3469720cbf9e08e07ac085f98255e2d7ade549
got 0eb7d596d4703cd3f773c529b6888eaad5172b48
got aebb4e2d5ae30e055df38924e2e835a14e623080
got f7dcbdac0a8a5dbfa92c684d9e4e3f5c520b9ec9
got 4b01496dc33d3439eec32b4fafe74bbcc4538b58
got 2772fee93881f1fc85d5e8a56b7a31fa3e1c5cca
got b29e3e4b72c922e10be26207b6a8c102029d9de8
got c48b0f49f00362d1ec7ed5625a1ab8e6d73bf946
got 345019345f09254292831cb75c6824d826592b09
--------hang here-----------
==============================================
Any suggestions? thanks!

-Aubrey

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2007-04-22  5:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-20  7:15 git clone problem through HTTP Aubrey Li
2007-04-20 11:48 ` Julian Phillips
2007-04-20 13:01   ` Medve Emilian-EMMEDVE1
2007-04-20 13:38   ` Aubrey Li
2007-04-20 13:59     ` Alex Riesen
2007-04-20 14:01     ` Brian Gernhardt
2007-04-20 14:19       ` Julian Phillips
2007-04-20 21:02 ` Junio C Hamano
2007-04-20 21:09   ` Junio C Hamano
2007-04-20 21:31   ` Junio C Hamano
2007-04-22  5:10     ` Aubrey Li

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).