How to debug curl access denied?
I am using curl to search artifacts from Artifactory, like this:
curl -s -u user:passwd | /usr/bin/jq -r .results[].uriBut it shows access denied error
[1] 25600
[2] 25601
[2]+ Done v=REL-0041-20181119.003944-userdebug
Access deniedI have no idea how to debug this problem, give me some idea please.
curl version: 7.47.0
22 Answers
It's several different questions.
Your uri is not escaped so [1][2][2]+ messages means
&treated as background execution, you need to quote uri with""You use
-swhich means silent, so error messages are suppressed. Please remove -s and see what error curl encountered, solve them, and then you add back jq command.If your problem is essentially artifactory usage, you can add artifactory to your title.
Had similar issue.
Using the -v parameter i see that proxy -is- used even though localhost should -not- be used.
A workarount for me is to unset http env variables:
For your env see: set|grep -i http
unset ...
Next step is to exlude localhost, 127.0.0.1
no_proxy=localhost,127.0.0.1 export no_proxy
It may be set in /etc/environment or /etc/bash.bashrc
Check this too. Don't forget to logout/in if you change things here.