Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

Add a .curlrc to use .netrc by default #1005

Closed
git-hyagi opened this issue Apr 7, 2022 · 0 comments
Closed

Add a .curlrc to use .netrc by default #1005

git-hyagi opened this issue Apr 7, 2022 · 0 comments
Labels
Feature New feature or request Triage-Needed

Comments

@git-hyagi
Copy link
Contributor

Is your feature request related to a problem? Please describe.
By default, curl does not check the .netrc file. Because of that, trying to make some API requests sometimes can fail when forgetting to pass the credentials, and also a .netrc will avoid having to pass the credentials in the command line and letting it available in shell history.

Describe the solution you'd like
We could create a .curlrc to instruct curl to pass the "-n" parameter.
For example:

$ cat ~/.curlrc 
# Make curl checks .netrc in home dir
-n
@git-hyagi git-hyagi added Feature New feature or request Triage-Needed labels Apr 7, 2022
git-hyagi added a commit to git-hyagi/pulp_installer that referenced this issue Apr 7, 2022
By default, curl does not check the ~/.netrc file. This commit
configures a .curlrc that will add the '-n' parameter to curl execution.

fixes: pulp#1005
git-hyagi added a commit to git-hyagi/pulp_installer that referenced this issue Apr 7, 2022
By default, curl does not check the ~/.netrc file. This commit
configures a .curlrc that will add the '-n' parameter to curl execution.

fixes: pulp#1005
@fao89 fao89 closed this as completed in 1ce5bc5 Apr 7, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature New feature or request Triage-Needed
Projects
None yet
Development

No branches or pull requests

1 participant