4
votes

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.

2

2 Answers

2
votes

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

12
votes

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