I used to have drone 0.4 working with Gogs but after moving to 0.5 I appear to have problems when attempting to integrate gogs with the new drone instance.
My gogs webhook configuration is as follows:
Payload URL:
http://10.204.96.58:8000/hook?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoibHdhc2hpbmd0b24iLCJ0eXBlIjoidXNlciJ9.DBVyH2WkZ602GGz0PYU4W4S79dK5V-k0x7PRF43BZLo
Content Type
application/json
Secret:
??
In the payload URL I got the access token from the drone website, after clicking the account/show token link. In the “secret” field I have tried the value I used for the “DRONE_SECRET” env var, on the drone server startup. I have also used a token that I saw in the drone server log:
drone-server_1 | time="2017-02-02T20:36:22Z" level=warning msg="agents can connect with token eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0Ijoib25lIGZsZXcgb3ZlciB0aGUgY3Vja29vIG5lc3QiLCJ0eXBlIjoiYWdlbnQifQ.QxhmflR1xtoF36c2OjUS8qtyTiXH9tDNG1CfUreq6Hk"
This is the errors I see in the log on the drone server:
drone-server_1 | time="2017-02-02T21:08:44Z" level=error msg="failure to parse token from hook for docker/java8. signature is invalid"
drone-server_1 | time="2017-02-02T21:08:44Z" level=error msg="Error #01: signature is invalid\n" ip=10.204.32.251 latency=1.65773ms method=POST path="/hook" status=400 time="2017-02-02T21:08:44Z" user-agent=GogsServer
This is the error I see in the gogs webhook “Test Delivery” panel:
Request Headers
Request URL: http://10.204.96.58:8000/hook?access_token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoibHdhc2hpbmd0b24iLCJ0eXBlIjoidXNlciJ9.DBVyH2WkZ602GGz0PYU4W4S79dK5V-k0x7PRF43BZLo
Request method: POST
Content-Type: application/json
X-Gogs-Delivery: 866778c4-d49b-4061-80c0-651f0e0c1ced
X-Gogs-Event: push
Response Headers (code: 400)
Access-Control-Allow-Origin: *
Cache-Control: no-cache, no-store, max-age=0, must-revalidate, value
Content-Length: 0
Content-Type: text/plain; charset=utf-8
Date: Thu, 02 Feb 2017 21:08:44 GMT
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Last-Modified: Thu, 02 Feb 2017 21:08:44 GMT
X-Content-Type-Options: nosniff
X-Drone-Version: 0.5.0+859
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block