How to close an issue with a commit + push?

Not sure which version of Gitea you’re using but I’m on 1.5.x and close by commit message works fine for me:

Could you share your entire commit message? It’s possible there’s something you’re doing that’s not getting parsed or, less likely, that you’re not a collaborator on the repo you’re trying to update.