Hello, I’m trying to setup Drone CI using BitBucket, but it seems there’s some problem. I always keep getting error
Invalid redirect_uri. I’ve tried two different accounts and gave all the available permissions, but it was the same. Then I tried GitHub with the same info and it worked.
The env used for BitBucket:
The env used for GitHub:
The redirect link was the same for both -
your DRONE_SERVER_HOST is invalid. It should be set to the hostname, however, in your example you have provided a url, prefixed with
http://. You can see examples of all configuration values in the Bitbucket installation documentation: https://docs.drone.io/installation/providers/bitbucket-server/
I used the wrong keyword here maybe, the
<host> is just and IP address without the protocol. Anyway this configuration works with GitHub, but not with BitBucket.
I can confirm that I am using Drone + Bitbucket and I do not have any issues with authentication or redirects. If you are having issues with Bitbucket, and not GitHub, perhaps your Bitbucket oauth application configuration  is incorrect. Based on the error message it sounds like a problem with your Callback URL configuration. This is the only explanation I can think of.
Hmm, very strange… Pulled down to use Drone 0.8.6 with the same configuration and just changed redirect from
/authorize and it works… But the 1.0.0 does not…
- DRONE_DEBUG=true // does not work
Seems I have found the issue: as I was deploying Drone using GCloud VM instance using their container configuration, where you provide image,arguments, env, volumes. And it seems the arguments were processed, because the host address would get and additional
http:// appended so it looked like
http://http://<ip>. Once I changed the host to
- DRONE_HOST=<ip> without the protocol it worked.
can you refresh this link. I get an error " Page Not Found".