I have create a personal access token for my project. in my gitlab-ci.yml I'm trying to create a docker image and then save it in my project's repository.
I'm able to login - I see an explicit message saying Login Succeeded. Then it builds the image but when trying to push is where I see this error:
12 exporting layers#12 exporting layers 7.8s done#12 writing image sha256:5337a378e31dcb6f8ed2cae0ab82188273947b395d52908eb07e4777b028a8a4 done#12 naming to docker.io/library/widgetsimage done#12 DONE 7.9sUse 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them$ docker push https://mygitserver.org/jj/pipelinetests/widgetsImageinvalid reference format
Code
stages: - build# - unit-testBuildDockerImage: stage: build environment: name: development image: docker services: - docker:dind script: - docker login -u myPersonalAccessTokenUserName -p asdfasdfQn https://mygitserver.org/JJ/pipelinetests - docker build -t widgetsimage . - docker push https://mygitserver.org/jj/pipelinetests/widgetsimage tags: - mac-pipelines-shell
I do see the Packages & Registries option in my project - which I guess indicates its enabled? But the list of packages is empty, of course.Any suggestions would be appreciated.
EDIT 1
I've tried changing the permissions / visibility on the project from private to Internal - everyone with access should now be able to do mostly everything on this test repo. But it didn't fix the issue.
Also in case it's related ...The URL for the project in gitlab is:
https://mygitserver.org/JJ/pipelinetests
aka. I have Uppercase in my path. But the docker login command never complains about the lower/uppercase. I've tested with both.
it always says it was successful:
Executing "step_script" stage of the job script$ docker login -u myPersonalAccessTokenUserName -p asdfasdfQn https://mygitserver.org/jj/pipelinetestsWARNING! Using --password via the CLI is insecure. Use --password-stdin.Login Succeeded$ docker build -t widgetsimage .#1 [internal] load build definition from Dockerfile
EDIT 2
I've also tried to use the url that I see when i navigate to the packages in the Gitlab GUI for the docker push command, like so:
https://mygitserver.org/jj/pipelinetests/-/packages/widgetimage
But still no dice.