Drillan767
(Joseph Levarato)
May 10, 2018, 9:38pm
1
Hello, I just pulled the drone.io image and did the basic configuration to allow it to connect to my self hosted Gogs, but I get an authentication error when trying to login after that.
I created a webhook on Gogs but I have no clue if I even should have done this.
Here is my docker-compose file with the settings from drone-server, drone-agent and Gogs:
drone-server:
image: drone/drone:0.8
labels:
- "traefik.backend=drone"
- "traefik.port=8000"
- "traefik.frontend.rule=Host:drone.mydomain.me"
ports:
- 8002:80
- 8000:8000
- 9001:9000
volumes:
- /var/lib/drone:/var/lib/drone/
restart: always
environment:
- DRONE_OPEN=false
- DRONE_HOST=http://drone.mydomain.me
- DRONE_GOGS=true
- DRONE_GOGS_URL=http://git.mydomain.me
- DRONE_GOGS_PRIVATE_MODE=false
- DRONE_GOGS_SKIP_VERIFY=true
- DRONE_SECRET=SomeRandomString
drone-agent:
image: drone/agent:0.8
ports:
- 3001:3000
command: agent
restart: always
depends_on:
- drone-server
volumes:
- /var/run/docker.sock:/var/run/docker.sock
environment:
- DRONE_SERVER=drone-server:9001
- DRONE_SECRET=SomeRandomString
gogs:
image: gogs/gogs
ports:
- "3000:3000"
- "10022:22"
volumes:
- "/var/gogs:/data"
labels:
- "traefik.docker.networks=default"
- "traefik.port=3000"
- "traefik.frontend.rule=Host:git.mydomain.me"
What should I do?
Thank you in advance
It looks like you have disabled registration, but forgot to set the DRONE_ADMIN variable. See http://docs.drone.io/user-registration/#closed-registration
Drillan767
(Joseph Levarato)
May 12, 2018, 10:07pm
3
Thank you, you were right, It all works now!
this is because it is missing the scheme in the url (http://
or https://
)
aleksey005
(Aleksey Kadetov)
March 13, 2019, 11:54pm
6
What environment variable should write?
I believe DRONE_GOGS_SERVER, but it would be helpful if you would provide your configuration. It makes our job easier
aleksey005
(Aleksey Kadetov)
March 14, 2019, 7:49am
9
Apparently Drone does not correctly call the APi Gogs for authorization, since according to the description of the api in github there is no such call …
With this env also error
Login Failed. Get gogs. gogs. 192. 168. 5. 187. xip. io/api/v1/users/admin/tokens: unsupported protocol scheme “”
- env:
- name: DRONE_ALWAYS_AUTH
value: "false"
- name: DRONE_DATABASE_DATASOURCE
value: /var/lib/drone/drone.sqlite
- name: DRONE_DATABASE_DRIVER
value: sqlite3
- name: DRONE_GOGS_SERVER
value: gogs. gogs. 192. 168. 5. 187. xip. io
- name: DRONE_KUBERNETES_ENABLED
value: "true"
- name: DRONE_KUBERNETES_NAMESPACE
value: default
- name: DRONE_KUBERNETES_SERVICE_ACCOUNT
value: drone-drone-pipeline
- name: DRONE_LOGS_DEBUG
value: "false"
- name: DRONE_PRIVATE_MODE
value: "false"
- name: DRONE_SERVER_HOST
value: drone. drone. 192. 168. 5. 187. xip. io
- name: DRONE_SERVER_PROTO
value: http
- name: DRONE_TLS_AUTOCERT
value: "false"
- name: DRONE_RPC_SECRET
valueFrom:
secretKeyRef:
key: secret
name: drone-drone
optional: false
aleksey005
(Aleksey Kadetov)
March 14, 2019, 8:37am
10
I am sorry :((((((
DRONE_GOGS_SERVER=http :// !!! and all work!!!