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 <curl-users_at_cool.haxx.se>
Date: Sun, 23 May 2021 13:33:36 +0200

Hi,

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

This one, hangs:
  curl -n --anyauth --netrc-file <( cat ~/.netrc) http://example.com
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?

/Morten
-----------------------------------------------------------
Unsubscribe: https://cool.haxx.se/list/listinfo/curl-users
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2021-05-23