Deploy to Heroku via circleci/heroku Orb fails with "fatal: protocol error"

Error Message

When deploying to Heroku with the circleci/heroku Orb, builds can fail with the error message:

fatal: protocol error: bad line length character: fata
error: error in sideband demultiplexer


This can be resolved by manually resetting the Git repository on Heroku.

With the Heroku CLI client, install the heroku-repo plugin and clear the repository on Heroku. Then push a fresh empty commit to Heroku.

heroku plugins:install heroku-repo
heroku repo:reset -a example-app
git commit --allow-empty -m "Reset Heroku Repository"
git push heroku main
git push origin main


Was this article helpful?
7 out of 10 found this helpful



Article is closed for comments.