2

i had write a .drone.yml in my gogs git repository. but when i push the git change , drone web tell me Insufficient privileges to use privileged mode. how can i fix it?

this is my .drone.yml:

pipeline:
   build:
     image: test-harbor.cx580.com/centos/centos7:Beat2.0
     privileged: true
     commands:
      - mkdir -p /data/k8s/drone/jar-db/
      - \cp README.md /data/k8s/drone/jar-db/
      - ls /data/k8s/drone/jar-db/
   push:
     image: plugins/docker
     repo: test-harbor.cx580.com/centos/centos7:Beat2.0
     registry: test-harbor.cx580.com
     username: ci
     password: '1qaz!QAZ'
     tags:
      - latest

i had search in google, this websize tell me Your repository isn't in the trusted list of repositories. Get in touch with Devops and ask them to trust it but ,how can i trusted the repositorie?

and i get setting in the drone web , and check the Trusted in the settings,but it also failed : img

1 Answers1

2
  1. Set drone-server env (My repositorie is GitLab)

... - DRONE_OPEN=false - DRONE_ADMIN=<your gitlab username> - DRONE_GITLAB_PRIVATE_MODE=true ...

  1. Enable drone settings

Settings -> Trusted like this

tabsp
  • 36
  • 3
  • I just found that only admin can modify "Project Settings", so the key is to set "DRONE_ADMIN". – tabsp Apr 17 '18 at 12:13