I am able to download the file from Sonatype Nexus using HTTP Basic Authentication Credentials in the HTTP Header.
But I am not able to achieve this by putting in the credentials as part of the url - something like this:
http://admin:[email protected]/nexus/service/local/artifact/maven/content?g=com.test&a=project&v=1.0&r=test_repo_1_release
Does anyone know why or how I can achieve the same thing without using auth in headers?
PS: this is a test environment - hence no SSL.
You have to use the authorization header, so you need to use a client that can set the authorizaiton http header. If you have curl or wget available you can do this as:
curl -u admin:admin123 http://nexus.example.com/nexus/service/local/artifact/maven/content?g=com.test&a=project&v=1.0&r=test_repo_1_release
wget --user=admin --password=admin123 http://nexus.example.com/nexus/service/local/artifact/maven/content?g=com.test&a=project&v=1.0&r=test_repo_1_release
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With