Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail To Download Content From Private Repository #10

Open
jeromebridge opened this issue Nov 20, 2015 · 3 comments
Open

Fail To Download Content From Private Repository #10

jeromebridge opened this issue Nov 20, 2015 · 3 comments

Comments

@jeromebridge
Copy link

I get an exception when trying to download content using the Bintray client: No credentials for preemptive authentication

I debugged to the line HttpClientConfigurator:292. It appears that it does not recognize credentials for the site: https://d29vzk4ow07wi7.cloudfront.net.

Update

3 problems I ran into:

  1. HTTP Client 4.4 does not handle the SSL Certificate from cloudfront properly. This issue. I needed to upgrade to 4.5.
  2. The HttpClientConfigurator does not setup an AuthScope that covers the cloudfront domain name causing the credentials to not be set.
  3. The BintrayImpl handles all HTTP responses and converts the stream to a String. In order to download I believe I need access to the original HTTP response to stream the data. See my workaround here.
@jeromebridge
Copy link
Author

I created a temporary workaround for my problems using the client to download content here in case anyone is interested.

@eyalbe4
Copy link
Contributor

eyalbe4 commented Nov 24, 2015

Hey @jeromebridge ,
Thanks for reporting this! Do you have a code sample that you can share that demonstrates sections 2 and 3?

@jeromebridge
Copy link
Author

2 - My Gist shows the workaround. If you download the file in my Gist or any file from a private repo that should reproduce that issue. The function hack_cloudfront_issue adds the AuthScope for all domains.
3 - My Gist also shows my workaround that accesses the HTTP Response object directly to download content. BintrayDownloadSolution1 shows the workaround in use to download a file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants