You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The new repository auth feature supports reading credentials from .netrc files. It can sometimes be useful to point tools to a file other than ~/.netrc, and both pip and uv support a NETRC environment variable for doing this:
Note that NETRC is not a universal standard (I believe it originates from the GNU project, though .netrc itself is much older), and some major tools don't support it, including:
The new repository auth feature supports reading credentials from
.netrc
files. It can sometimes be useful to point tools to a file other than~/.netrc
, and bothpip
anduv
support aNETRC
environment variable for doing this:pip
, which usesrequests
under the hood: https://github.com/psf/requests/blob/1764cc938efc3cc9720188dfa6c3852c45211aa0/src/requests/utils.py#L210uv
, which uses thenetrc
crate: https://github.com/gribouille/netrc/blob/f8b614440a8d45cae8a5bd90a43266d8f487b93b/src/lib.rs#L85-L105Note that
NETRC
is not a universal standard (I believe it originates from the GNU project, though.netrc
itself is much older), and some major tools don't support it, including:curl
, which has no plans to; andgit
, which seems more open to it.On balance, I think this still points towards our supporting it, though.
The text was updated successfully, but these errors were encountered: