bzr git support plugin

git-import does not work (502 Bad Gateway)

Asked by rubik on 2011-11-29

Hello,
I'm trying to get bzr-git working. If I try to clone a git repository from github it doesn't always work:

    $ bzr git-import https://github.com/rubik/testit.git
    Use 'bzr checkout' to create a working tree in the newly created branches.

Ok, it works fine.
But if I try it on a different repo it raises a weird error:

    $ bzr git-import https://github.com/fabric/fabric.git
    bzr: ERROR: Invalid http response for https://github.com/fabric/fabric.git/git-upload-pack: Unable to handle http code 502: Bad Gateway

or:

    $ bzr git-import https://github.com/rubik/pyg.git
    bzr: ERROR: Invalid http response for https://github.com/rubik/pyg.git/git-upload-pack: Unable to handle http code 502: Bad Gateway

And if I try with a Git-read-only URL:

    $ bzr git-import git://github.com/kennethreitz/requests.git
    bzr: ERROR: The remote server unexpectedly closed the connection.

Thank you,

rubik

Question information

Language:
English Edit question
Status:
Solved
For:
Bazaar Git Plugin Edit question
Assignee:
No assignee Edit question
Solved by:
Jelmer Vernooij
Solved:
2011-11-30
Last query:
2011-11-30
Last reply:
2011-11-30
Jelmer Vernooij (jelmer) said : #1

On 11/29/2011 06:40 PM, rubik wrote:
> New question #180411 on Bazaar Git Plugin:
> https://answers.launchpad.net/bzr-git/+question/180411
>
> Hello,
> I'm trying to get bzr-git working. If I try to clone a git repository from github it doesn't always work:
>
> $ bzr git-import https://github.com/rubik/testit.git
> Use 'bzr checkout' to create a working tree in the newly created branches.

>
> Ok, it works fine.
> But if I try it on a different repo it raises a weird error:
>
> $ bzr git-import https://github.com/fabric/fabric.git
> bzr: ERROR: Invalid http response for https://github.com/fabric/fabric.git/git-upload-pack: Unable to handle http code 502: Bad Gateway

>
> or:
>
> $ bzr git-import https://github.com/rubik/pyg.git
> bzr: ERROR: Invalid http response for https://github.com/rubik/pyg.git/git-upload-pack: Unable to handle http code 502: Bad Gateway
>
> And if I try with a Git-read-only URL:
>
> $ bzr git-import git://github.com/kennethreitz/requests.git
> bzr: ERROR: The remote server unexpectedly closed the connection.
>
It looks like github has very recently become more strict about what
kind of objects they allow clients to fetch. It will now only allow
fetching objects that are actually present in the refs list and that are
unpeeled. bzr-git would previously never fetch tag objects, since they
can't be used in bzr (we have tags, but not annotated tags).

I'm committing a fix to bzr-git trunk.

Cheers,

Jelmer

Best Jelmer Vernooij (jelmer) said : #2

lp:bzr-git works again with these repositories now.

rubik (michelelacchia) said : #3

Thanks Jelmer Vernooij, that solved my question.