.netrc: Difference between revisions
Jump to navigation
Jump to search
(→Python) |
|||
(2 intermediate revisions by the same user not shown) | |||
Line 8: | Line 8: | ||
Unix systems have for a long time offered a way for users to store their user name and password for remote FTP servers, in the form of the <code>.netrc</code> file. The <code>.netrc</code> file is typically stored in a user's home directory. Curl supports it. Format example: | Unix systems have for a long time offered a way for users to store their user name and password for remote FTP servers, in the form of the <code>.netrc</code> file. The <code>.netrc</code> file is typically stored in a user's home directory. Curl supports it. Format example: | ||
<syntaxhighlight lang='text'> | |||
machine example.com | |||
login some-user | |||
password some-password | |||
</syntaxhighlight> | |||
or | |||
<syntaxhighlight lang='text'> | <syntaxhighlight lang='text'> | ||
Line 16: | Line 24: | ||
=Python= | =Python= | ||
{{External|https://docs.python-requests.org/en/latest/user/authentication/#netrc-authentication}} | |||
The Python runtime picks it up. | The Python runtime picks it up. |
Latest revision as of 23:51, 17 May 2023
External
Internal
Overview
Unix systems have for a long time offered a way for users to store their user name and password for remote FTP servers, in the form of the .netrc
file. The .netrc
file is typically stored in a user's home directory. Curl supports it. Format example:
machine example.com
login some-user
password some-password
or
machine example.com login some-user password some-password
To configure curl
to use it, pass -n
or --netrc
on command line.
Python
The Python runtime picks it up.