I have Bitbucket server setup, and I have Drone setup. Drone sees my repo and attempts to build. When it does, I get an error saying that it was unable to clone the repo.
To diagnose, I tried to run the drone/git plugin manually. I found that the following works:
I then captured the env variables passed at runtime to a transient container (I assume it is the drone/git container) that was created when I hit “Restart” in the browser. This container had an empty DRONE_REMOTE_URL and an empty DRONE_NETRC_MACHINE, but it had the DRONE_NETRC_USERNAME and DRONE_NETRC_PASSWORD specific correctly.
My believe is that the clone is failing due to the missing env variables. Is this known to work? I didn’t manage to see in the code where these env variables are being set or where the drone/git is being configured and called.
Yes, we test Drone against all supported source control management systems. We have our own Bitbucket Server installation that we used to develop the integration, and there are production installations using this integration.
My belief is that the clone is failing due to the missing env variables.
Thank you, that was the key I needed. I had started Drone and sync’d the repo before I had enabled HTTPS cloning in bitbucket. I restarted Drone, but that didn’t pick up the fresh configuration. Instead, I had to hit “sync” again in Drone, and then it picked up the new config and worked as expected.
Now that I understand how the integration works, it is clear to me. I was missing some high level description in the Drone.io docs of how the system worked. Perhaps that would be a worthy enhancement.
we are aware that the documentation needs significant improvement, however, we are also very resource constrained. I appreciate the feedback and we will do our best to take this into account as we continue to improve the docs.