netrc.d 1.1 KB

123456789101112131415161718192021222324252627282930
  1. c: Copyright (C) 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. Mutexed: netrc-file netrc-optional
  11. Multi: boolean
  12. ---
  13. Makes curl scan the *.netrc* file in the user's home directory for login name
  14. and password. This is typically used for FTP on Unix. If used with HTTP, curl
  15. enables user authentication. See *netrc(5)* and *ftp(1)* for details on the
  16. file format. Curl does not complain if that file does not have the right
  17. permissions (it should be neither world- nor group-readable). The environment
  18. variable "HOME" is used to find the home directory.
  19. On Windows two filenames in the home directory are checked: *.netrc* and
  20. *_netrc*, preferring the former. Older versions on Windows checked for *_netrc*
  21. only.
  22. A quick and simple example of how to setup a *.netrc* to allow curl to FTP to
  23. the machine host.domain.com with user name 'myself' and password 'secret'
  24. could look similar to:
  25. machine host.domain.com
  26. login myself
  27. password secret