Sadashiva Ashok
Sadashiva Ashok

Reputation: 11

Downloading Jfrog artifactory throws 403 error[Only non-anonymous users are allowed to access AQL queries]

I am using Jenkins Pipeline to download Jfrog artifactory on a server where Jfrog CLI is configured.

1.The following cmd when executed from Jenkins throws the below error:

jf rt dl is-passport-dev/xyz.zip C\Windows\xyz.zip

[Error] the --url option is mandatory

2.The same above command on executing directly on the jfrog configured server works like a charm.

3.Below cmd is executed as a workaround for Point 1:

jf rt dl --url https://<artifactory_url>/artifactory/is-passport-dev/xyz.zip C\Windows\xyz.zip

[Info] Searching items to download...

[Error] Server response: 403 Forbidden

Only non-anonymous users are allowed to access AQL queries

This error is seen both when executing from the jenkins pipeline and also on executing directly on jfrog configured server. I have ensured that the user and the repository has the right permission for uploading and downloading.

Note: jf rt upload --url <url_path> <source_file_path> <destination_file_path> works fine without any issues

Can someone suggest me how to overcome this problem?

Upvotes: 1

Views: 2694

Answers (1)

louis fabien
louis fabien

Reputation: 56

The problem is that you are trying to download an Artifact but you are 'anonymous' (server is not configured in the cli):

two solutions:

  1. give 'anonymous' users read rights on you repo (not recommended)

  2. Configure the cli with a user and password/token

    jf c add server_1 
    
    

    follow steps to configure

    cmd to use it

    jf rt dl is-passport-dev/xyz.zip C:\Windows\xyz.zip --flat --server-id server_1
    
    

Upvotes: 0

Related Questions