hey everyone. I am trying to connect to a private ...
# general
f
hey everyone. I am trying to connect to a private docker registry. But it seems that the password or username is not passed correctly. While not using the provider, it throws 401, and using the provider it changes to 403. That leads to the conclusion that the provider is indeed used, and tries to login. But is not able to login. I can use the same credentials with
docker login
and have it working in the terminal. Am I missing a setup step? Or is this just a bug?
Copy code
new docker.Provider(
  `github-docker-provider`,
  {
    registryAuth: [
      {
        address: '<http://ghcr.io|ghcr.io>',
        username: 'XXX',
        password: 'XXX',
      },
    ],
  }
)
error: Running program ‘/Users/xxx/Documents/projects/xxx’ failed with an unhandled exception: Error: invocation of dockerindex/getRegistryImagegetRegistryImage returned an error: invoking dockerindex/getRegistryImagegetRegistryImage: 1 error occurred: * Got error when attempting to fetch image version xxx/xxx:latest from registry: Got bad response from registry: 403 Forbidden
q
The credentials may be enough to pass
docker login
, but are they authorized to pull the image you're trying to pull with
getRegistryImage
? Try that locally, I believe it will also fail
f
Nope. I am authorised to pull the image locally. I also use the credentials on a server. I am currently using a PAT with full-access for debugging.
q
Can you share your code that's pulling the image?
f
196 Views