Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--netrc-file with non-existent / non-readable file - no error message #16163

Closed
arlt opened this issue Feb 4, 2025 · 0 comments
Closed

--netrc-file with non-existent / non-readable file - no error message #16163

arlt opened this issue Feb 4, 2025 · 0 comments
Assignees

Comments

@arlt
Copy link

arlt commented Feb 4, 2025

I did this

curl --location https://fqdn/file --netrc-file which_does_not_exist doesn't produce an error message / is silently ignored

I expected the following

curl output:

curl: netrc-file "which_does_not_exist" is not readable or does not exist

curl/libcurl version

curl 7.76.1 (x86_64-redhat-linux-gnu) libcurl/7.76.1 OpenSSL/3.2.2 zlib/1.2.11 brotli/1.0.9 libidn2/2.3.0 libpsl/0.21.1 (+libidn2/2.3.0) libssh/0.10.4/openssl/zlib nghttp2/1.43.0
Release-Date: 2021-04-14
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets

operating system

Linux myvm 5.14.0-503.22.1.el9_5.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jan 15 08:02:15 EST 2025 x86_64 x86_64 x86_64 GNU/Linux

@bagder bagder self-assigned this Feb 4, 2025
bagder added a commit that referenced this issue Feb 4, 2025
Made the netrc parser return a more consistent set of error codes and
error messages, and also return error properly if the .netrc file is
missing.

Add test 697 to verify error on missing netrc file.

Fixes #16163
Reported-by: arlt on github
@bagder bagder closed this as completed in 943de21 Feb 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants