Git推送结果为“致命:sha1文件”< stdout>'写入错误:无效参数“错误 [英] Git push results in "fatal: sha1 file '<stdout>' write error: Invalid argument" error
问题描述
经过大约3个小时的调查后,我设法给自己头痛,并没有找到解决这个错误的办法。压缩对象:100%(228/228),完成。
写入失败:连接被中止| | 3 KiB / s
致命错误:sha1文件'< stdout>'写入错误:无效参数
错误:无法将某些文件推送到'git@heroku.com: -git'
我正在向heroku推送一个提交,并且上面的内容被抛出。我该如何解决这个问题?
每次部署都发生这种情况吗?在推送到Heroku的git遥控器时,您偶尔会看到网络故障。
我一直可以通过重新推动来解决这个问题。如果Heroku认为已经推送了最新的提交,请创建一个NOOP提交并强制部署它:
touch foo.txt
git add foo.txt
git commit -m'NOOP'
git push heroku --force
......如果这样,你可以删除你在本地提交的NOOP提交:
git reset --hard origin / master
After sleuthing for about 3 hours now I managed to give myself a headache and not found a fix to this error:
Compressing objects: 100% (228/228), done.
Write failed: The connection was abortediB | 3 KiB/s
fatal: sha1 file '<stdout>' write error: Invalid argument
error: failed to push some refs to 'git@heroku.com:---------.git'
I am pushing a commit to heroku, and the above is thrown out. How do I fix this?
Is this happening on every deploy? You will occasionally see network failures when pushing to Heroku's git remote.
I've always been able to work around this by re-pushing. If Heroku thinks the latest commit has already been pushed, create a NOOP commit and force-deploy it:
touch foo.txt
git add foo.txt
git commit -m 'NOOP'
git push heroku --force
...and if that works, you can remove the NOOP commit you made locally:
git reset --hard origin/master
这篇关于Git推送结果为“致命:sha1文件”< stdout>'写入错误:无效参数“错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!