curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Read ~/.netrc only once

From: Morten Kjærulff via curl-users <>
Date: Sun, 23 May 2021 13:33:36 +0200


If needs my userid+password, this:
  curl -n --anyauth
will read my ~/.netrc to find my userid+password.
This will do the same:
  curl -n --anyauth --netrc-file ~/.netrc

This one, hangs:
  curl -n --anyauth --netrc-file <( cat ~/.netrc)
I assume this is because curl reads the file more than once.

It would be cool if curl would read the ~/.netrc / --netrc-file only once.
I could then replace "cat ~/.netrc" with something more secure.

Or can I do it another way?

Received on 2021-05-23