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