Repository navigation
Conversation
Pass --netrc-optional to curl so hosts with a netrc entry are fetched with credentials. On 401/403, hint that a ~/.netrc entry can be used. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Contributor
|
This pull request has been imported. If you are a Meta employee, you can view this in D125825578. (Because this pull request was imported automatically, there will not be any future comments.) |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Pass
--netrc-optionaltocurlso that HTTP provider URLs behind basic authentication (for example, Artifactory) can be fetched using credentials from~/.netrc.curlcommand line, or error messages.401or403, the error now includes a hint to add amachine <host> login <user> password <token>entry to~/.netrc(%USERPROFILE%\_netrcon Windows).dotslash-file.md.Related: #38. This applies netrc globally with no opt-out. If a config file (#4) is preferred, this can be gated behind a setting later.
Test plan
cargo testpasses. Thehttp__nonexistent_urlsnapshot is updated for the newcurlargument.cargo clippyshows no new warnings compared tomain.dotslash -- create-url-entryfetches an endpoint that returns 404 without credentials.401.🤖 Generated with Claude Code