Gitlab Intergration

Hello Awesome people,

I’m having a slight issue after upgrading - Are there any known issues with drone + gitlab 8.17.3? I’m seeing “failure to parse token from hook for devs/repo. signature is invalid” on push hook. Do have my personal token setup in the gitlab integration portion and tcpdumping the incoming hook I get:

POST /api/hook?owner=devs&name=repo&access_token=eyJhbkciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0ZXh0IjoicGF1bHRlY2giLCJ0eXBlIjoidXNlciJ9.B9EKK8QV3-LxURJNjNgQ9I2jRU-j7-nSCKhl2MwBLA8 HTTP/1.1
Content-Type: application/json
X-Gitlab-Event: Service Hook
Connection: close
Content-Length: 2371

HTTP/1.1 400 Bad Request
X-Content-Type-Options: nosniff
X-Drone-Version: 0.5.0+909
X-Frame-Options: DENY
X-Xss-Protection: 1; mode=block


This error is not related to gitlab, and instead indicates a token issue. Note that you cannot use personal tokens for hooks. The hooks use a special token that can only be added by drone, and has the repository name embedded in the token signature

1 Like


Thank you @bradrydzewski, Where can I obtain the correct token?

@bradrydzewski Well, that was simple enough. Disabled and reactivated from drone UI and it appears to have configured the token itself. Strange it didn’t do that during round 1!


When you enable a repository in the UI (via the toggle switches) drone automatically configures the hook with the correct token. Manual configuration is not possible