I'm trying to execute a curl command from the terminal.

  • I need to provide HTTP authentication
  • I need to POST a .jar file

This works when HTTP authentication is disabled:

curl --data-binary @~/file.jar localhost:8090/jars/test100

And this works when HTTP authention is enabled:

curl --netrc-file ~/.curl_password_file localhost:8090

However, combining both options does not work when HTTP authentication is enabled. The error returned is:

curl: (3) <url> malformed
The resource requires authentication, which was not supplied with the request%

I've tried combining both the --data-binary and --netrc-file options in all sorts of different ways. Nothing :(

Any ideas?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.