Celeb Glow
updates | March 29, 2026

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[].uri

But it shows access denied error

[1] 25600
[2] 25601
[2]+ Done v=REL-0041-20181119.003944-userdebug
Access denied

access denied

I have no idea how to debug this problem, give me some idea please.

curl version: 7.47.0

2

2 Answers

It's several different questions.

  1. Your uri is not escaped so [1][2][2]+ messages means & treated as background execution, you need to quote uri with ""

  2. You use -s which 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.

  3. If your problem is essentially artifactory usage, you can add artifactory to your title.

1

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.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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