What URL to use to mirror a (git) branch from bitbucket

Asked by Jose F Nieves on 2013-01-07

Hi

What is the appropriate URL to use in launchpad to mirror a git repository host in bucket? Specifically, if this is the bb URL, what whould be used in the launchpad project page?

git clone https://bitbucket.org/noaaport/npemwin.git

Thank you

Jose F Nieves

Question information

Language:
English Edit question
Status:
Answered
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Last query:
2013-01-08
Last reply:
2013-01-08
Curtis Hovey (sinzui) said : #1

I updated https://code.launchpad.net/~noaaport/npemwin/trunk to try http://bitbucket.org/noaaport/npemwin which bitbucket accepts when cloning the branch locally.

Jose F Nieves (nieves) said : #2

Thanks Curtis Hovey, that solved my question.

Jose F Nieves (nieves) said : #3

I answered too fast - the problem persists. The import still fails.

William Grant (wgrant) said : #4

BitBucket is restricting non-git User-Agents from accessing their HTTPS service. They seem to be checking for the presence of 'git/' in the string.

$ curl -v -A git https://bitbucket.org/noaaport/npemwin.git/info/refs?service=git-upload-pack |& grep '^< HTTP'
< HTTP/1.1 404 NOT FOUND
$ curl -v -A git/ https://bitbucket.org/noaaport/npemwin.git/info/refs?service=git-upload-pack |& grep '^< HTTP'
< HTTP/1.1 200 OK
$ curl -v -A git/foo https://bitbucket.org/noaaport/npemwin.git/info/refs?service=git-upload-pack |& grep '^< HTTP'
< HTTP/1.1 200 OK
$ curl -v -A gat/foo https://bitbucket.org/noaaport/npemwin.git/info/refs?service=git-upload-pack |& grep '^< HTTP'
< HTTP/1.1 404 NOT FOUND
$ curl -v -A youareagit/foo https://bitbucket.org/noaaport/npemwin.git/info/refs?service=git-upload-pack |& grep '^< HTTP'
< HTTP/1.1 200 OK

It's probably best to contact them and ask them to be a bit less restrictive.

Guilherme Salgado (salgado) said : #5

It doesn't look like anybody contacted them about this, so I've filed https://bitbucket.org/site/master/issue/6666

Guilherme Salgado (salgado) said : #6

This was their response:

   Launchpad will need to send a git-like user agent to talk to our git backends. Anything containing git/ will do

Can you help with this problem?

Provide an answer of your own, or ask Jose F Nieves for more information if necessary.

To post a message you must log in.