Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.
If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!
[ProGet, maven] 401 when connecting to registry
-
Hi everyone
I'm trying to use ProGet as registry for my maven dependencies. However I'm struggling to connect to ProGet.
Whenever I execute a maven reload, I get a "401 Unauthorized authentication failed".
I have setup an API-Key like this:
My settings.xml looks like this:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <servers> <server> <id>central</id> <username>api</username> <password>[API-KEY]</password> </server> </servers> <profiles> <profile> <id>ProGet</id> <repositories> <repository> <id>central</id> <url>[URL-to-feed]</url> <snapshots><enabled>true</enabled></snapshots> <releases><enabled>true</enabled></releases> </repository> </repositories> <pluginRepositories> <pluginRepository> <id>central</id> <url>[URL-to-feed]</url> <snapshots><enabled>true</enabled></snapshots> <releases><enabled>true</enabled></releases> </pluginRepository> </pluginRepositories> </profile> </profiles> <activeProfiles> <activeProfile>ProGet</activeProfile> </activeProfiles> <mirrors> <mirror> <id>proget</id> <name>ProGet</name> <url>[URL-to-feed]</url> <mirrorOf>*</mirrorOf> </mirror> </mirrors> </settings>
Does anyone have an Idea what I'm doing wrong? Do I need to add additional configuration to my maven feed?
-
The configuration looks okay, and is basically what we have documented. So I think it ought to work...
From here, I would start by monitoring the HTTP traffic between Maven and ProGet. You can use a tool like Fiddler Classic on Windows or Wireshark. What you should see is:
- Maven issues a request, and ProGet returns a 401 with
WWW-Authenticate: Basic
header - Maven reissues the request, sending a
Authorization: Basic XXXXXXX
The
XXXXX
will be Base64 encodedapi:your-api-key
. If you don't see that, then something else is wrong. I would post it and maybe we can help.You can also try downloading maven artifacts from an "Incognito" window. Your browser should also prompt you for a username/password, and then you can enter
api
and your api key.Thanks,
Alana
- Maven issues a request, and ProGet returns a 401 with