Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to publish to a private registry with credentials #257

Open
adamtrip opened this issue Sep 14, 2024 · 3 comments
Open

Unable to publish to a private registry with credentials #257

adamtrip opened this issue Sep 14, 2024 · 3 comments

Comments

@adamtrip
Copy link

I've been trying to generate a project to a private registry but I'm not being able.

 aspirate generate --image-pull-policy Always --non-interactive --include-dashboard --disable-secrets --container-image-tag "1.0.0-qa.8" --container-repository-prefix 'dmstudio' --container-registry ### --private-registry --private-registry-url ### --private-registry-username '###' --private-registry-password '###'

When I run this command I get the following error:

C:\Program Files\dotnet\sdk\8.0.401\Containers\build\Microsoft.NET.Build.Containers.targets(242,5): error CONTAINER1016: Unable to
access the repository 'dmstudio/backend' in the registry '###'. Please confirm your credentials are correct and
that you have access to this repository and registry. [D:\Desenvolvimentos\DMStudio\DMStudio\src\Host\Host.csproj]

if I do a docker login before I'm able to do so but since I'm running this on a github action pipeline, even doing the login before the command, it does not work.

I don't know if I'm missconfiguring something however, if I run the generated publish command and add SDK_CONTAINER_REGISTRY_UNAME and SDK_CONTAINER_REGISTRY_PWORD it publishes it just fine.

Thanks in advance. Any extra info required, just ask :)

@CristianWulfing
Copy link

CristianWulfing commented Sep 30, 2024

I'm facing the same issue, even if I run docker login on the private registry previously.

@gurelsoycaner
Copy link

gurelsoycaner commented Oct 5, 2024

I'm facing the same issues.

I'm copying the generated docker-compose file into my pipeline, but I keep getting errors and am unable to log in to a private docker registry.

aspirate generate --output-format compose

after copying I'm doing

docker-compose -f .\docker-compose.yaml up -d

PLS HELP.

@robbash
Copy link

robbash commented Dec 13, 2024

@adamtrip I just started playing around with Aspirate and I was able to publish to a private Github container repository. I was locally logged in and it worked straight away. You likely got something wrong with your repository URL. Try publishing an image built by docker composed by the values of --container-repository-prefix 'dmstudio' --container-registry ### and your backend, ie. (using github here) ghcr.io/dmstudio/backend, to confirm the details and your permissions.

@gurelsoycaner it seems like your having issues pulling the image from a private repository. That seems to be a general issue, I can't get that part to work either using Kustomize or Helm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants