Hi! I’ve been trying to implement Drone with Gitea. I’ve read most thread I found about this error message in both this forum and the last one.
This is my docker-compose for both Gitea and Drone:
docker-compose.yml
version: "3"
networks:
default:
external: false
gitea:
external: false
services:
gitea:
image: gitea/gitea:latest
container_name: gitea
environment:
- USER_UID=1000
- USER_GID=1000
- GITEA__database__DB_TYPE=
- GITEA__database__HOST=
- GITEA__database__NAME=
- GITEA__database__USER=
- GITEA__database__PASSWD=
restart: always
networks:
- gitea
volumes:
- ./gitea/gitea:/data
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
ports:
- "3000:3000"
- "222:22"
depends_on:
- db
db:
image: postgres:13
restart: always
environment:
- POSTGRES_USER=
- POSTGRES_PASSWORD=
- POSTGRES_DB=
networks:
- gitea
volumes:
- ./gitea/postgres:/var/lib/postgresql/data
drone:
image: drone/drone:latest
ports:
- "9000:80"
environment:
- DRONE_SERVER_HOST=drone.example.com
- DRONE_SERVER_PROTO=https
- DRONE_RPC_SECRET=1234
- DRONE_GITEA_CLIENT_ID=4567
- DRONE_GITEA_CLIENT_SECRET=7890
- DRONE_GITEA_SERVER=https://git.example.com
- DRONE_LOGS_DEBUG=true
- DRONE_CRON_DISABLED=true
volumes:
- ./data:/data
networks:
- gitea
- default
runner:
image: drone/drone-runner-docker:latest
environment:
- DRONE_RPC_HOST=drone.example.com
- DRONE_RPC_PROTO=https
- DRONE_RPC_SECRET=1234
volumes:
- /var/run/docker.sock:/var/run/docker.sock
networks:
- default
- gitea
So far, I just have one user in Gitea, which is me, with admin privileges. I created the OAuth2 application. It seems to connect, I guess? It created the webhook. When I try to do a test run, I get these logs:
Logs from Drone
{"level":"debug","msg":"cannot parse webhook: Invalid webhook signature","time":"2022-02-24T04:13:19Z"},
{"fields.time":"2022-02-24T04:13:19Z","latency":531783,"level":"debug","method":"POST","msg":"","remote":"172.25.0.1:56386","request":"/hook?secret=5IJTixzCEhpTcgyqsbrYChVlJy5CIrrW","request-id":"25XagvhDUXEqhw8j5aAU36hPgQ2","time":"2022-02-24T04:13:19Z"},
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2022-02-24T04:13:25Z","type":"docker","variant":""},
{"level":"debug","msg":"api: read access granted","name":"blog-notes","namespace":"francocalvo","request-id":"25Xal67lhpP5Depa2zspIHPBkcd","time":"2022-02-24T04:13:52Z","user.login":"francocalvo","visibility":"public"},
{"fields.time":"2022-02-24T04:13:52Z","latency":360575,"level":"debug","method":"GET","msg":"","remote":"172.25.0.1:56552","request":"/api/repos/francocalvo/blog-notes","request-id":"25Xal67lhpP5Depa2zspIHPBkcd","time":"2022-02-24T04:13:52Z"},
{"level":"debug","msg":"api: read access granted","name":"blog-notes","namespace":"francocalvo","request-id":"25XalebWEO30ntpoDCIh3Al5sqv","time":"2022-02-24T04:13:56Z","user.login":"francocalvo","visibility":"public"},
{"level":"debug","msg":"api: read access granted","name":"blog-notes","namespace":"francocalvo","request-id":"25XalccvdYg9bGH8XppDHxBqdDH","time":"2022-02-24T04:13:56Z","user.login":"francocalvo","visibility":"public"},
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: context canceled","os":"linux","time":"2022-02-24T04:13:55Z","type":"docker","variant":""},
{"fields.time":"2022-02-24T04:13:56Z","latency":5603588,"level":"debug","method":"DELETE","msg":"","remote":"172.25.0.1:56556","request":"/api/repos/francocalvo/blog-notes","request-id":"25XalccvdYg9bGH8XppDHxBqdDH","time":"2022-02-24T04:13:56Z"},
{"admin":true,"level":"debug","msg":"api: access granted","name":"blog-notes","namespace":"francocalvo","read":true,"request-id":"25XalccvdYg9bGH8XppDHxBqdDH","time":"2022-02-24T04:13:56Z","user.login":"francocalvo","visibility":"public","write":true},
{"fields.time":"2022-02-24T04:14:57Z","latency":45066751777,"level":"debug","method":"POST","msg":"","remote":"172.25.0.1:56620","request":"/hook?secret=5IJTixzCEhpTcgyqsbrYChVlJy5CIrrW","request-id":"25XandehAIGYWuzLP45PTFde24X","time":"2022-02-24T04:14:57Z"},
{"commit":"95c6899ca24607f88378a4dd703ae8b37b69c2ae","error":"Not Found","event":"push","level":"warning","msg":"trigger: cannot find yaml","ref":"refs/heads/main","repo":"francocalvo/blog-notes","time":"2022-02-24T04:14:57Z"},
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2022-02-24T04:14:45Z","type":"docker","variant":""},
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: context canceled","os":"linux","time":"2022-02-24T04:14:35Z","type":"docker","variant":""},
{"commit":"95c6899ca24607f88378a4dd703ae8b37b69c2ae","event":"push","level":"debug","msg":"trigger: received","ref":"refs/heads/main","repo":"francocalvo/blog-notes","time":"2022-02-24T04:14:12Z"},
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2022-02-24T04:14:05Z","type":"docker","variant":""},
{"commit":"95c6899ca24607f88378a4dd703ae8b37b69c2ae","event":"push","level":"debug","msg":"webhook parsed","name":"blog-notes","namespace":"francocalvo","time":"2022-02-24T04:14:12Z"},
{"fields.time":"2022-02-24T04:13:58Z","latency":37550489,"level":"debug","method":"POST","msg":"","remote":"172.25.0.1:56566","request":"/api/repos/francocalvo/blog-notes","request-id":"25XalpxlojgZbAIbKIB9Menssdc","time":"2022-02-24T04:13:58Z"},
{"admin":true,"level":"debug","msg":"api: access granted","name":"blog-notes","namespace":"francocalvo","read":true,"request-id":"25XalpxlojgZbAIbKIB9Menssdc","time":"2022-02-24T04:13:58Z","user.login":"francocalvo","visibility":"public","write":true},
{"fields.time":"2022-02-24T04:13:56Z","latency":450796,"level":"debug","method":"GET","msg":"","remote":"172.25.0.1:56560","request":"/api/repos/francocalvo/blog-notes","request-id":"25XalebWEO30ntpoDCIh3Al5sqv","time":"2022-02-24T04:13:56Z"},
{"level":"debug","msg":"api: read access granted","name":"blog-notes","namespace":"francocalvo","request-id":"25XalpxlojgZbAIbKIB9Menssdc","time":"2022-02-24T04:13:58Z","user.login":"francocalvo","visibility":"public"},
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: context canceled","os":"linux","time":"2022-02-24T04:15:15Z","type":"docker","variant":""},
{"arch":"amd64","kernel":"","kind":"pipeline","level":"debug","msg":"manager: request queue item","os":"linux","time":"2022-02-24T04:15:25Z","type":"docker","variant":""}
I’ve tried everything I could. I stripped my nginx file to this:
Nginx
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name drone.*;
client_max_body_size 0;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
include /config/nginx/resolver.conf;
include /config/nginx/proxy.conf;
set $upstream_app 192.168.0.68;
set $upstream_port 9000;
set $upstream_proto http;
proxy_pass $upstream_proto://$upstream_app:$upstream_port;
}
}