Uploaded image for project: 'Bitbucket Cloud'
  1. Bitbucket Cloud
  2. BCLOUD-5221

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

    XMLWordPrintable

Details

    Description

      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!

      #!ruby
      #! /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 })
      
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            5d9ea3bc4a77 jbraeuer
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: