xf.li | 6c8fc1e | 2023-08-12 00:11:09 -0700 | [diff] [blame^] | 1 | c: Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. |
| 2 | SPDX-License-Identifier: curl |
| 3 | Long: netrc |
| 4 | Short: n |
| 5 | Help: Must read .netrc for user name and password |
| 6 | Category: curl |
| 7 | Example: --netrc $URL |
| 8 | Added: 4.6 |
| 9 | See-also: netrc-file config user |
| 10 | Multi: boolean |
| 11 | --- |
| 12 | Makes curl scan the *.netrc* (*_netrc* on Windows) file in the user's home |
| 13 | directory for login name and password. This is typically used for FTP on |
| 14 | Unix. If used with HTTP, curl will enable user authentication. See |
| 15 | *netrc(5)* and *ftp(1)* for details on the file format. Curl will not |
| 16 | complain if that file does not have the right permissions (it should be |
| 17 | neither world- nor group-readable). The environment variable "HOME" is used |
| 18 | to find the home directory. |
| 19 | |
| 20 | A quick and simple example of how to setup a *.netrc* to allow curl to FTP to |
| 21 | the machine host.domain.com with user name 'myself' and password 'secret' |
| 22 | could look similar to: |
| 23 | |
| 24 | machine host.domain.com |
| 25 | login myself |
| 26 | password secret |