Unable to list users repositories with Ruby (Excon gem) (Code used to work)

Issue #5221 invalid
Jens Bräuer
created an issue

Hi Bitbucket,

please find the below code. It used to work, but stopped. I use Ubuntu 12.04 (Ruby 1.8.7 with Excon gem 0.16.7).

As you see, I request the user's repositories twice. First with curl, then with excon. I feel, this is could be a bug on your side as the curl-request works fine. However the Ruby/Excon one gives me a 404.

I would be very glad if you could fix this.

Thanks a lot!

#! /usr/bin/ruby                                                                
require 'rubygems'
require 'excon'
require 'pp'

url="https://api.bitbucket.org/1.0/user/repositories/"
auth="Authorization"
basic="Basic XXXXXXX=="

system("curl", "-H", "#{auth}: #{basic}", url)
pp Excon.get(url, :headers => { auth => basic })

Comments (3)

  1. Log in to comment