错误:RPC失败;结果= 22,HTTP代码= 400

问题描述:

我正在尝试将我的应用程序推送到Heroku,但出现此错误消息.我环顾四周,有人提到GitHub最近开始将http存储库访问重定向到https,并且您的git对此更改不满意.但是我在推广到heroku时遇到了麻烦,任何帮助将不胜感激.

I am trying to push my app on to Heroku, but I am getting this error message. I have looked around, someone mentioned about GitHub recently started redirecting http repository access to https and it appears your git is unhappy about this change. But I am having troubles pushing to heroku, any help will be much appreciated.

 error: RPC failed; result=22, HTTP code = 400

之所以会发生这种情况,是因为Heroku的Git无法理解上述

This may occur due the reason that Heroku's Git doesn't understand shallow clone as mentioned here.

解决方法是在部署之前禁用浅表克隆.

Workaround is to disable shallow clone before deployment.

git fetch --unshallow