.netrc: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * https://everything.curl.dev/usingcurl/netrc =Internal= * curl =Overview= Unix systems have for a long time offered a way for users to store their...")
 
 
(5 intermediate revisions by the same user not shown)
Line 3: Line 3:
=Internal=
=Internal=
* [[Curl#.netrc|curl]]
* [[Curl#.netrc|curl]]
* [[Python Engineering#23LL|Python Engineering]]
=Overview=
=Overview=


Line 11: Line 13:
login some-user
login some-user
password some-password
password some-password
</syntaxhighlight>
or
<syntaxhighlight lang='text'>
machine example.com login some-user password some-password
</syntaxhighlight>
</syntaxhighlight>


To configure <code>curl</code> to use it, pass <code>-n</code> or <code>--netrc</code> on command line.
To configure <code>curl</code> to use it, pass <code>-n</code> or <code>--netrc</code> on command line.
=Python=
{{External|https://docs.python-requests.org/en/latest/user/authentication/#netrc-authentication}}
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

https://docs.python-requests.org/en/latest/user/authentication/#netrc-authentication

The Python runtime picks it up.