In reality, it wasn't the attacker's incompetence, it was the hosting provider's fault (which is a "Serverless app platform" they use to deploy their phishing pages)
When you deploy a simple page with them it exposes .git/CONFIG and the x-access-token that grants access to the repository.