bert2002
bert2002

Reputation: 67

Download artifact from Nexus

I am trying to download a nexus/maven artifact using curl or wget, but I always get an "403 - Forbidden".

URL: http://nexus.domain.com:8081/nexus/service/local/artifact/maven/redirect?r=snapshots&g=com.domain.org&c=dist-main&a=domain-server&v=LATEST&p=tar.gz

I tried using the following ip address, but it does not accept the credentials. The user exists, password is correct and have access to the repository. Does the user need special requirements?

curl -X GET -u user:password $URL

Or is there any way to use the api access key with curl? I am using Nexus 2.11.3.

Thanks.

Upvotes: 4

Views: 31960

Answers (2)

Dinesh
Dinesh

Reputation: 1810

you need to include -O parameter to download

curl -X GET -u user:password $URL -O

If you don't want the password to show in your history. This will prompt for a password

curl -X GET -u user $URL -O

Upvotes: 13

Michael-O
Michael-O

Reputation: 18430

User account does not have the permission to do so. Talk to your Nexus admin.

Upvotes: 2

Related Questions