Hi Team,
i am facing issue with GitLab while pushing images from Drone CI/CD to GitLab Registry, i was able to loggin successfully but while pushing images throwing “denied: access forbidden”.
Note: Able to Logging Successfully
Below are the details from .drone.yml
Below is the Drone.yml file which i used to push the image
.drone.yml file(pipeline) :
pipeline:
build:
image: docker:latest
environment:
-
REGISTRY_USERNAME= mycompany
-
REGISTRY_PASSWORD= mypassword
-
ENV=dev
volumes:
- /var/run/docker.sock:/var/run/docker.sock
commands:
-
docker login -u “$REGISTRY_USERNAME” -p “$REGISTRY_PASSWORD” https://gitlab.mycompany.com
-
docker build -t registry.mycompany.com/mycompany/drone-test/image_test05:latest .
-
docker push registry.mycompany.com/mycompany/drone-test/image_test05:latest
Drone CI/CD console output:
docker login -u “$REGISTRY_USERNAME” -p “$REGISTRY_PASSWORD” https://gitlab.mycompany.com
Configure a credential helper to remove this warning. See
Login Succeeded
docker build -t registry.mycompany.com/mycompany/drone-test/image_test05:latest .
Sending build context to Docker daemon 166.9kB
Step 1/2 : FROM ubuntu:16.04
—> 5e8b97a2a082
Step 2/2 : RUN apt-get update
—> Using cache
—> 76979c8b29d0
Successfully built 76979c8b29d0
Successfully tagged registry.mycompany.com/mycompany/drone-test/image_test05:latest
docker push registry.mycompany.com/mycompany/drone-test/image_test05:latest
The push refers to repository [registry.mycompany.com/mycompany/drone-test/image_test05]
9a77f33909f8: Preparing
2de391e51d73: Preparing
d73dd9e65295: Preparing
686245e78935: Preparing
d7ff1dc646ba: Preparing
644879075e24: Preparing
644879075e24: Waiting
denied: access forbidden
Let me know if you need more details.
Thanks
Sravan