postfacto icon indicating copy to clipboard operation
postfacto copied to clipboard

Error Deploying

Open Erambal opened this issue 4 years ago • 2 comments

I've tried deploying multiple times, but I keep getting this error.

"error: src refspec main does not match any"

I couldn't find anything in the documentation. Could I get some help on this?

Erambal avatar Jul 16 '21 15:07 Erambal

Could you be specific about how you're trying to deploy? Based on the error message (see e.g. https://stackoverflow.com/q/65173291/3001761 for the general explanation as to what's happening) I'd guess you're trying to deploy to Heroku via:

https://github.com/pivotal/postfacto/blob/db61713a38d6a8a945840e0965c88cbaee02510b/deployment/deploy-heroku.sh#L67-L71

If main doesn't exist, do you have any git config that would use a different default branch name (init.defaultBranch), or are you using an earlier version of git (that option was added in 2.28)?

textbook avatar Jul 16 '21 15:07 textbook

I figured it out and yes I'm deploying to Heroku. "git push --set-upstream "https://git.heroku.com/$APP_HOST.git" main" did not work and kept giving me that error. Instead, I used "git push --set-upstream "https://git.heroku.com/$APP_HOST.git" master" and I could then proceed.

Erambal avatar Jul 16 '21 15:07 Erambal