Issue #2219 resolved

private repositories not visible via bitbucket API (BB-797)

Remi Broemeling
created an issue

I'm trying to list my repositories via the bitbucket API, but I only ever get public repositories, even if I am authenticated.

For example, the command:

{{{

!sh

$ curl https://api.bitbucket.org/1.0/users/rbroemeling/ }}}

gives all of the public repositories, but the command:

{{{

!sh

$ curl https://api.bitbucket.org/1.0/users/rbroemeling/ --basic --user rbroemeling:PASSWORDHERE }}}

... shows just the same repositories. None of my private repositories are displayed.

I've tried this a variety of ways and have never been able to get the bitbucket API to display private repositories. Is this a bug in the API, or is it something that I am doing wrong?

Thanks.

Comments (7)

  1. Remi Broemeling reporter

    Just as an additional comment: I know that CURL is sending the basic authentication details to BitBucket, because when I call curl with the --verbose parameter, I can see the header:

    > Authorization: Basic ...
    

    It is being sent, but it appears to be ignored by the BitBucket API?

  2. Remi Broemeling reporter

    If anyone who is watching this ticket is interested, I wrote a pretty-quick and as-of-yet mostly untested (YMMV) python script to allow for quick pulling/updating of all of a user's bitbucket repositories to a local directory. It is part of my "sh" repository here: https://bitbucket.org/rbroemeling/sh/ , under the filename bin/bitbucket_mirror.py

    Full path to the current-as-of-this-writing is:

    https://bitbucket.org/rbroemeling/sh/src/2e82d58e8388/bin/bitbucket_mirror.py

    The general purpose of the script is to facilitate keeping a local (and always-up-to-date) copy of all of the bitbucket repositories of a given user; it's written to be easy to run repeatedly from CRON.

    Anyway, thanks for the fix jstepka!

  3. Log in to comment