Hello,
We've been using the Nexus OSS yum plugin with authentication and it worked fine up to version 2.6.0 but with later versions rpms can't be pulled down anymore, yum gets a 401. Nexus is behind Apache and this what's in the Apache logs:
IP_ADDR - - [31/Dec/2013:18:04:28 +0000] "GET /content/repositories/snapshots/(...)/0.1.56-SNAPSHOT/(...)-0.1.56-20131231.163133-4-rpm.rpm HTTP/1.1" 401 -
On the client server this is what yum sees:
Downloading Packages:
http://nexus01(...)/content/repositories/snapshots/(...)/0.1.56-SNAPSHOT/(...)-0.1.56-20131231.163133-4-rpm.rpm: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 401"
Trying other mirror.
This happened with 2.6.1, I rolled back to 2.6.0 and it worked. Now I upgraded to the latest, 2.7.0 and I get the same error but rolling back triggers other errors because I didn't back up my 'sonatype-work/nexus/conf"' so that's not an option anymore.
I do a 'yum clean all && yum makecache' which are successful and this is what I see in the Apache logs (HTTP 200s):
IP_ADDR - - [31/Dec/2013:18:12:22 +0000] "GET /content/repositories/snapshots/repodata/repomd.xml HTTP/1.1" 200 3458
IP_ADDR - - [31/Dec/2013:18:12:22 +0000] "GET /content/repositories/snapshots/repodata/b6439d9fe96c8361463ed09138e4fe9424ea80cf23d3e363038045ca9378f76e-filelists.sqlite.bz2 HTTP/1.1" 200 9485
IP_ADDR - - [31/Dec/2013:18:12:22 +0000] "GET /content/repositories/snapshots/repodata/40e7b99a615d969132ef805b7ce04cd1bf786c563813128e1b541ea52b679c6e-primary.sqlite.bz2 HTTP/1.1" 200 16084
IP_ADDR - - [31/Dec/2013:18:12:22 +0000] "GET /content/repositories/snapshots/repodata/211ed80de294cb7518f1cd8bcd36bb0ddd9f5a3719aa38a9e533c63c9f879cff-other.sqlite.bz2 HTTP/1.1" 200 3849
But then yum install gets a 401...
The repo definition is the one suggested in Nexus with baseurl being: baseurl=http://nexus_user:pass...@nexus.server/path/to/snapshots. If I remove the credentials from the baseurl yum makecache gets a 401 trying to pull down the repo metadata, so it fails even sooner.
To conclude Nexus is able to serve the repo metadata using the credentials but not the rpm. I'm kind of at a loss here, any help is greatly appreciated.
Thanks,
Alex