V1 promote with environment gives a 404


By using client or api, I reach a 404 while promoting a build.

I found in the code that it is required to be admin to do so.

Is it right? Is there anyway to allow non-admin to promote builds?

a 404 seems not the right code for unauthorized access.

Thank you

– refs
curl -X POST -i https://drone.host.us/api/repos/x/x/builds/6211/promote -H “Authorization: Bearer …”
drone build promote x/x 6211 env



drone follows the same convention as GitHub and uses a 404 to prevent leakage of private repository to anauthorized users [1]

Requests that require authentication will return 404 Not Found , instead of 403 Forbidden , in some places. This is to prevent the accidental leakage of private repositories to unauthorized users.

[1] https://developer.github.com/v3/#authentication