JuliaLang / Downloads.jl

MIT License
89 stars 34 forks source link

Allow specifying the username #225

Open danielmatz opened 1 year ago

danielmatz commented 1 year ago

Libcurl's SSH key-based and agent-based authentication methods don't work unless the username is set, either by including it in the URL or by setting CURLOPT_USERNAME. This PR adds a username keyword to the download and request functions to allow the user to optionally specify a username.

Related to this discourse discussion: https://discourse.julialang.org/t/privately-hosting-binarybuilder-products-with-authentication/88409

codecov[bot] commented 1 year ago

Codecov Report

Merging #225 (ae93f7d) into master (3ed0f08) will decrease coverage by 0.46%. The diff coverage is 25.00%.

@@            Coverage Diff             @@
##           master     #225      +/-   ##
==========================================
- Coverage   90.26%   89.81%   -0.46%     
==========================================
  Files           5        5              
  Lines         575      579       +4     
==========================================
+ Hits          519      520       +1     
- Misses         56       59       +3     
Impacted Files Coverage Δ
src/Curl/Curl.jl 100.00% <ø> (ø)
src/Curl/Easy.jl 91.61% <0.00%> (-0.62%) :arrow_down:
src/Downloads.jl 84.95% <50.00%> (-0.63%) :arrow_down:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

danielmatz commented 10 months ago

It seems the single CI failure is caused by a lack of test coverage of this diff. I wasn't really sure how to test this, though. Does anyone have tips on that?