Drone on Gitlab fails at API granting (SOLVED)

I had the gitlab address with http instead of httpS … my fault. :slight_smile:

Hello,

I used image: drone/drone:0.8

The callback works first and I can login. Then Gitlab ask for confirming API access. Once I press authorize I receive the yellow message “The system failed to process your Login request.”

BTW I noticed that the keys provided by gitlab are much longer than those in your documentation.

Browser log:
bundle.467f732….js:2492

  1. Object

  2. message: “User not authorized”

  3. status: 401

Message before it fails:
An application called drone is requesting access to your GitLab account. This application was created by xxxx. Please note that this application is not provided by GitLab and you should verify its authenticity before allowing access.

This application will be able to:

  • Access the authenticated user’s API

Grants complete read/write access to the API, including all groups and projects.

Cheers,

PS: Same setup work on github.

I am having the same issue as you with drone/drone:0.4, 0.8, and 1.0
Did you resolve this issue? Was it the https requirement for the callback?

Hi,

It was a long time ago, so I checked my actual working config for 1.0.0-rc.1.

I use a private gitlab with https. The drone server is using https through a nginx reverse proxy.

On your gitlab there are two settings to check.

  • The Webhook under Project->Settings->Integration you should change the url to https instead of http. If I recall correctly this is the problem for each new linked project.

  • The Gitlab Application Settings should also use an https address.

On your drone-server settings (docker):

DRONE_GITLAB_SERVER= should have an address beginning with https.

DRONE_SERVER_HOST= should be without protocol, just the host address without http/https

DRONE_SERVER_PROTO=https

On your drone-agent settings (docker):

DRONE_RPC_SERVER=https:// pointing to your DRONE_SERVER_HOST

Hope this helps.

Let me know.

Cheers