mudler/luet

Unable to Consume Luet Packages From Private Registry Due to Authentication Error

mokarage opened this issue · 0 comments

Luet version:
0.32.5
CPU architecture, OS, and Version:
Debian 4.19.249-2 x86_64 GNU/Linux
Describe the bug
I'm trying to consume (install) a package which I successfully built and pushed to my private registry. I'm getting the following error while I use the command luet install --config repositories.yaml category/package:

failed downloading image my.private.registry.tld/path/to/packages:repository.yaml: GET https://my.private.registry.tld/v2/path/to/packages/manifests/repository.yaml: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:path/to/packages Type:repository]]

Here is my repositories.yaml configuration:

repositories:
  - name: "test"
    type: "docker"
    priority: 1
    enable: true
    urls:
       - "my.private.registry.tld/path/to/packages"

To Reproduce

  1. Prepare a private registry with htpasswd authentication
  2. Build a package (luet build category/package)
  3. Create repo (luet create-repo --name "test" --type docker --output my.private.registry.tld/path/to/packages --push-images)
  4. Try to install the package (luet install --config repositories.yaml category/package)
  5. The error appears

Expected behavior

Successfully install package from private registry

Logs

  DEBUG   (config.go:#204:github.com/mudler/luet/cmd/util.initContext)  System rootfs: /
  DEBUG   (config.go:#205:github.com/mudler/luet/cmd/util.initContext)  Colors true
  DEBUG   (config.go:#206:github.com/mudler/luet/cmd/util.initContext)  Logging level info
  DEBUG   (config.go:#207:github.com/mudler/luet/cmd/util.initContext)  Debug mode true
 INFO  Luet 0.32.5-gd5d21653d7313ff396c0511af402834c89974ee3 2022-06-07
 INFO  Copyright (C) 2019-2022 Ettore Di Giacinto
       This program comes with ABSOLUTELY NO WARRANTY.
       This is free software, and you are welcome to redistribute it under certain conditions.
       For documentation, visit https://luet.io.
  DEBUG   (install.go:#72:github.com/mudler/luet/cmd.glob..func10)  Solver type:  rate: 0.700000, discount: 1.000000, attempts: 9000, initialobserved: 999999
 INFO   :::> Install
  DEBUG   (repository.go:#895:github.com/mudler/luet/pkg/installer.(*LuetSystemRepository).Sync)  Sync of the repository test in progress...
 INFO   Downloading my.private.registry.tld/path/to/packages:repository.yaml
 WARNING  failed downloading image my.private.registry.tld/path/to/packages:repository.yaml: GET https://my.private.registry.tld/v2/path/to/packages/manifests/repository.yaml: UNAUTHORIZED: authentication required; [map[Action:pull Class: Name:path/to/packages Type:repository]]`
ERROR    Error: Failed matching solutions against repository for category/package where are definitions coming from?!

Additional context