Failed pull request, cannot restart

Hello, I am completely new with using Drone. I get already installed and running Drone from previous admin and now I am struggling with a weird issue.

The company using Bitbucket cloud integration. After the manager removed previous admin from Bitbucket team, they are unable to provide pull operation in Drone. It failed with the message:

+ git init
Initialized empty Git repository in /tmp/drone-6nPJMh7BbN5VoFCu/drone/src/.git/
+ git remote add origin
+ git fetch  origin +refs/heads/yyy:
fatal: unable to access '': The requested URL returned error: 403

I double-checked all configuration by Docs but anyway, I am not able to run this pull request correctly. When I tried to click on the “Restart” button in the detail it started to do the operation but it fails again. Then I tried to add debug env variable to docker instance and again, do Restart. But now, I am not able to click/run Restart operation. When I click on Restart button nothing has to happen. In the log, I can see a message like

{"commit":"1cfca69eb7b8ab26c1d9a0d47d00272f8cf922dd","event":"push","level":"debug","msg":"trigger: received","ref":"refs/heads/yyy","repo":"xxx/xxx","time":"2020-08-14T09:18:59Z"}

In the webgui nothing has changed but after a few secs I can see in the log:

{"commit":"1cfca69eb7b8ab26c1d9a0d47d00272f8cf922dd","error":"","event":"push","level":"warning","msg":"trigger: cannot find yaml","ref":"refs/heads/yyy","repo":"rogelli/rogelli","time":"2020-08-14T09:19:44Z"}

What kind of YAML is Drone looking for? .drone.yml file? This file is actually existing in the yyy, I verified it in Bitbucket webgui. It is also weird that nothing has changed in the webgui after clicking on restart.

Thanks for any help!

I tried to enter URL https://drone/api/repos/xxx/xxx/builds/235/logs/1/1 into browser and I can see json with exact same error saying fatal: unable to access

The error indicates that Drone cannot fetch the yaml. The yaml is fetched using the oauth2 token of the user that enabled the repository (oauth makes API calls on behalf of a user). If the user recently had their permissions revoked you need to change ownership. This can be done by either disabling and re-enabling the repository in the UI or using the drone repo chown command as described here: Drone receives 404 from github posting build status

1 Like

jeez! Thank you very much! It works perfectly, as you described! Thanks once again.