Initial build fails everytime with "Unauthorised to build", but works on rebuild

We use a team in BuildKite to manage who can trigger builds. For most people on my team their initial build (when they push changes to a feature branch) fails with the error “Unauthorised to build”, but when they click “Rebuild” it runs fine.

This never happens to me, and the only difference I can see is that I am the “Team Maintainer”, while they are all “Team Members”. I’ve double checked the team name in our build kite environment config, and double checked all team members are part of the team, and the problem persists.

Any help in fixing this initial error state would be greatly appreciated. Thanks!

Hi @Luke, that’s an odd one. Could you send through a link to one of these builds to support@buildkite.com so we can take a closer look at what’s going on? Thanks!

:man_facepalming:

Thanks for help (via email).

Turns out people’s git config was using the incorrect email, so the commits would fail to build, but because they were logged into BuildKite under the correct emial the “Rebuild” worked fine.