Kaniko: cannot push to proget container registry

Created on 13 Mar 2019  路  9Comments  路  Source: GoogleContainerTools/kaniko

Actual behavior
I get unsupported status code 401 when i try to push an image to proget 5.1.22 with authentication.
Unauthorized: Access is denied due to invalid credentials
If i use the same credentials with docker cli it works fine.

Expected behavior
Successfully push to proget docker feed.

To Reproduce
Steps to reproduce the behavior:

  1. run docker image inedo/proget
  2. configure authentication and docker feed
  3. try to push an image with kaniko

Additional Information

  • Dockerfile
FROM busybox
  • Build Context
    Please provide or clearly describe any files needed to build the Dockerfile (ADD/COPY commands)
  • Kaniko Image (fully qualified with digest)
    gcr.io/kaniko-project/executor:debug@sha256:642ef6209052ed2d96bfc20d2edc2803300ce3d858773629683b6d0903624777
areregistry prioritp3

Most helpful comment

Hi @ViceIce @GO3LIN,

With the latest version of Proget (v5.2.22 03/01/2020),

Proget and Kaniko are now working \o/

More details with :

  • PG-1651 - FIX: ProGet misdetects some Docker auth token requests as anonymous.
  • PG-1650 - FIX: Docker API treats /v2/ endpoint differently than other endpoints for HTTP Basic authentication.

All 9 comments

Some more info.

curl -svo nul --http1.1 https://pkg.visualon.de/v2/

< HTTP/1.1 401 Unauthorized
< Cache-Control: private
< Content-Type: text/html
< Vary: Authorization
< Server: Microsoft-IIS/10.0
< X-AspNet-Version: 4.0.30319
< X-UA-Compatible: IE=edge
< X-ProGet-Version: 5.1.22.5
< Docker-Distribution-API-Version: registry/2.0
< WWW-Authenticate: Bearer realm="https://pkg.visualon.de/v2/_auth",service="pkg.visualon.de"
< X-Powered-By: ASP.NET
< Date: Wed, 13 Mar 2019 16:09:34 GMT
< Content-Length: 1293

curl -sv --http1.1 -u 'api:xxxx' https://pkg.visualon.de/v2/_auth?service=pkg.visualon.de

< HTTP/1.1 200 OK
< Cache-Control: private
< Content-Type: application/json; charset=utf-8
< Vary: Authorization
< Server: Microsoft-IIS/10.0
< X-AspNet-Version: 4.0.30319
< X-UA-Compatible: IE=edge
< X-ProGet-Version: 5.1.22.5
< Docker-Distribution-API-Version: registry/2.0
< X-Powered-By: ASP.NET
< Date: Wed, 13 Mar 2019 16:27:39 GMT
< Content-Length: 329
{
  "token": "xxxx",
  "expires_in": 3600,
  "issued_at": "2019-03-13T16:27:39.5648355Z"
}

@ViceIce I am having the same issue with ProGet and Kaniko, I've tried everything but still getting that 401 Unauthorized error. However, I am able to push images using docker login, etc...

Can you show the config part ? How do you get the ProGet token ? Here's my config.json file:

{
        "auths": {
          "${PROGET_URI}": {
            "username": "${PROGET_USERNAME}",
            "password": "${PROGET_PASSWORD}"
          }
        }
}

PROGET_URI just points to the root ProGet url, should I be using a different url for authentication ??

@GO3LIN I've never got it working, sorry.

Feelsbad @ViceIce thanks for the quick feedback, will try to update you if I found something

Hi @ViceIce @GO3LIN,

With the latest version of Proget (v5.2.22 03/01/2020),

Proget and Kaniko are now working \o/

More details with :

  • PG-1651 - FIX: ProGet misdetects some Docker auth token requests as anonymous.
  • PG-1650 - FIX: Docker API treats /v2/ endpoint differently than other endpoints for HTTP Basic authentication.

Sounds like this might be resolved on the Proget side. Can we close this issue?

Sorry, hadn't have time to test.

Was this page helpful?
0 / 5 - 0 ratings