Unable to push images to GitLab from Drone.io throwing denied: access forbidden

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

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

Please fins the more details for Omnibus installs:

Please find the diagnostic details for Omnibus installs:

sudo gitlab-rake gitlab:check
Checking GitLab Shell …

GitLab Shell version >= 7.1.2 ? … OK (7.1.2)
Repo base directory exists?
default… yes
Repo storage directories are symlinks?
default… no
Repo paths owned by git:root, or git:git?
default… yes
Repo paths access is drwxrws—?
default… yes
hooks directories in repos are links: …
Administrator / testRepo … repository is empty
Administrator / test-api … repository is empty
mycompany Dev / VCX-Project1 … repository is empty
mycompany Dev / drone-test … ok
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Redis available via internal API: OK

Access to /var/opt/gitlab/.ssh/authorized_keys: OK
gitlab-shell self-check successful

Checking GitLab Shell … Finished

Checking Sidekiq …

Running? … yes
Number of Sidekiq processes … 1

Checking Sidekiq … Finished

Reply by email is disabled in config/gitlab.yml
Checking LDAP …

LDAP is disabled in config/gitlab.yml

Checking LDAP … Finished

Checking GitLab …

Git configured correctly? … yes
Database config exists? … yes
All migrations up? …

#####################################################################

sudo gitlab-rake gitlab:env:info

System information
System: Ubuntu 16.04
Current User: git
Using RVM: no
Ruby Version: 2.3.6p384
Gem Version: 2.6.13
Bundler Version:1.13.7
Rake Version: 12.3.0
Redis Version: 3.2.11
Git Version: 2.14.3
Sidekiq Version:5.0.5
Go Version: unknown

GitLab information
Version: 10.7.3
Revision: 2555d6c1
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: postgresql
URL: https://gitlab.mycompany.com
HTTP Clone URL: https://gitlab.mycompany.com/some-group/some-project.git
SSH Clone URL: git@gitlab.mycompany.com:some-group/some-project.git
Using LDAP: no
Using Omniauth: no

GitLab Shell
Version: 7.1.2
Repository storage paths:

default: /var/opt/gitlab/git-data/repositories
Hooks: /opt/gitlab/embedded/service/gitlab-shell/hooks
Git: /opt/gitlab/embedded/bin/git

Hi,

Issue has been fixed.

Best!
Sravan

@sravan1265 can you tell how did the issue has been fixed? i have the same

i solved issue, using auth token. The token i got from the integrations settings for repo.

pipeline:
  docker:
    image: plugins/docker
    repo: registry.gitlab.com/mygroup/hello
    registry: registry.gitlab.com
    secrets: [ docker_username, docker_password ]
    auth: "eyJhb...5tak"