简体   繁体   English

错误:尝试推送到gitlab时无法编写sha1

[英]error: unable to write sha1 while trying to push to gitlab

I was trying to push a single pdf file and I got this error: 我试图推送单个pdf文件,但出现此错误:

error: unable to write sha1 filename ./objects/54/1cc9d1b18f218c85f9d7f5fe7a129ab595f: No such file or directory
To git@gitlab.com:myrepo
 ! [remote rejected] master -> master (unable to migrate objects to permanent storage)
error: failed to push some refs to 'git@gitlab.com:myrepo

Any Idea what has happened!? 任何想法发生了什么事! What is this sha1 file!? 这是sha1文件是什么!

That's odd: the initial error message should have been prefixed by the word remote: , ie: 这很奇怪:初始错误消息应该以单词remote:开头,即:

remote: error: unable to write sha1 filename ./objects/54/1cc9d1b18f218c85f9d7f5fe7a129ab595f: No such file or directory
To git@gitlab.com:myrepo
 ! [remote rejected] master -> master (unable to migrate objects to permanent storage)
error: failed to push some refs to 'git@gitlab.com:myrepo

That would make sense, but this error, without the remote: prefix, does not. 这样做是有道理的,但是没有remote:前缀的此错误没有意义。

Any error prefixed by the word remote: is coming from another Git. 任何以单词remote:为前缀的错误都来自另一个Git。 When you run git push , your Git calls up another Git and sends information (including Git objects) to that other Git. 当您运行git push ,您的Git会调用另一个Git并将信息(包括Git对象)发送到另一个Git。 That other Git does some verification to determine whether or not your git push is allowed. 其他Git会进行一些验证,以确定是否允许您的git push Once it's done all the checking, and has decided that the update is allowed, that Git finishes by incorporating the objects into its repository and finalizing everything. 一旦完成所有的检查,并决定更新允许的,是Git可以完成通过将对象转换成它的存储库,并敲定了一切。

If the error had been prefixed by remote: , this would then make sense: the remote—the other Git—tried to finalize everything, but something went wrong during this process. 如果错误已由remote:前缀,那么这将是有道理的:远程设备(另一个Git)试图完成所有操作,但是在此过程中出了点问题。 They then let your Git know that the problem occurred, so your Git copied the error message through, prefixing it with the word remote: , then your Git printed the last three lines on its own, letting you know that something went wrong. 然后,他们让您的Git知道发生了问题,因此您的Git通过以下方式复制了错误消息,并在其前面加上单词remote: :,然后您的 Git独自打印了最后三行,让您知道出了点问题。

In short, this would mean that the problem is on another computer, not on your computer. 简而言之,这意味着问题出在另一台计算机上,而不是您的计算机上。 You must show it to whoever manages that other computer (on gitlab.com ), and have them see what's wrong with their system. 您必须将其显示给管理该另一台计算机的任何人(在gitlab.com ),并请他们查看其系统出了什么问题。

But without the remote: , none of this analysis quite holds up. 但是如果没有remote: :,则此分析都无法成立。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 git 推送错误,无法写入 sha1 文件名./objects - git push error, unable to write sha1 filename ./objects Git 推送错误,“无法写入 Sha1 文件名权限被拒绝” - Git push error, "Unable to write Sha1 filename permission denied" git 错误“无法写入 sha1 文件名……权限被拒绝” - git error “unable to write sha1 filename … Permission denied” 承诺在VirtualBox上使用Git - 错误:无法写入sha1文件名 - Committing to Git on VirtualBox - error: unable to write sha1 filename 部署时无法读取SHA1文件 - Unable to Read SHA1 File while Deploying Git over samba - 无法写入sha1文件名| 没有权限 - Git over samba - unable to write sha1 filename | Permission denied gitlab错误:尝试推送更改时未知作者 - gitlab ERROR: Unknown Author while trying to push changes Git 拉取错误:无法创建临时 sha1 文件名 - Git pull error: unable to create temporary sha1 filename Git 无法签出以提交具有空目录的文件(错误:无效的 object 160000;null sha1;致命:无法写入新的索引文件) - Git can't checkout to commit which have empty directory (error: invalid object 160000; null sha1; fatal: unable to write new index file) git push over sshfs失败,“关闭sha1文件时出错:错误的文件描述符” - git push over sshfs failing with “error when closing sha1 file: Bad file descriptor”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM