I encountered this: `fly deploy` support for docker build SSH mounts (`docker build --ssh`)?
I managed to get my build working by adding this to the dockerfile:
# Configure git to use SSH for GitHub
RUN --mount=type=secret,id=GITHUB_TOKEN git config --global url."https://$(cat /run/secrets/GITHUB_TOKEN)@github.com/".insteadOf "https://github.com/"
And then flyctl deploy --remote-only --build-secret GITHUB_TOKEN=$BUILDBOT_ACCESS_TOKEN
Where BUILDBOT_ACCESS_TOKEN is a personal (classic) github access token that has repo access.
Hope this helps anyone encountering the same problem!