• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 Long: netrc
2 Short: n
3 Help: Must read .netrc for user name and password
4 Category: curl
5 Example: --netrc $URL
6 Added: 4.6
7 ---
8 Makes curl scan the *.netrc* (*_netrc* on Windows) file in the user's home
9 directory for login name and password. This is typically used for FTP on
10 Unix. If used with HTTP, curl will enable user authentication. See
11 *netrc(5)* and *ftp(1)* for details on the file format. Curl will not
12 complain if that file does not have the right permissions (it should be
13 neither world- nor group-readable). The environment variable "HOME" is used
14 to find the home directory.
15 
16 A quick and simple example of how to setup a *.netrc* to allow curl to FTP to
17 the machine host.domain.com with user name \&'myself' and password \&'secret'
18 should look similar to:
19 
20 .B "machine host.domain.com login myself password secret"
21