Went digging through old bugs. Removed
LOCAL_ROOT_URL = http://localhost:443/
from config. restarted, tried again, worked? Is this intended?
Where I found the idea: [remote rejected] main -> main (pre-receive hook declined) · Issue #21528 · go-gitea/gitea · GitHub