Git,错误:远程解包失败:无法创建临时对象目录 - 通过创建新分支

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/51495092/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 05:19:49  来源:igfitidea点击:

Git, error: remote unpack failed: unable to create temporary object directory - By creating new Branch

gitgit-branchgit-commitgit-pushgit-repo

提问by St?rungs Sucher

Good Day.

再会。

I Try to create a new Branch in my Repo.

我尝试在我的 Repo 中创建一个新分支。

I made this:

我做的:

Git branch events

Git Checkout events

Git 分支事件

Git Checkout 事件

That worked. So I changed some files and made

那奏效了。所以我更改了一些文件并制作了

Git Status

Git add --all

Git Commit -m "Commit"

Git 状态

Git 添加 --all

Git 提交 -m "提交"

That worked well but I tried to push it and that didn't work:

效果很好,但我试图推动它,但没有奏效:

Git push -u origin events

git push -u 源事件

This is the Error:

这是错误:

Enumerating objects: 9, done.
Counting objects: 100% (9/9), done.
Delta compression using up to 4 threads.
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 716 bytes | 716.00 KiB/s, done.
Total 5 (delta 4), reused 0 (delta 0)
error: remote unpack failed: unable to create temporary object directory
To http://git.int.censoredlink/scm/freeb/freebrep.git
! [remote rejected] events -> events (unpacker error)
error: failed to push some refs to 'http://[email protected]/scm/freeb/freebrep.git'

枚举对象:9,完成。
计数对象:100% (9/9),完成。
Delta 压缩最多使用 4 个线程。
压缩对象:100% (5/5),完成。
写入对象:100% (5/5),716 字节 | 716.00 KiB/s,完成。
共 5 个(delta 4),重用 0 个(delta 0)
错误:远程解包失败:无法创建临时对象目录
http://git.int.censoredlink/scm/freeb/freebrep.git
![远程拒绝] 事件 -> 事件(解包器错误)
错误:无法将一些引用推送到“ http://[email protected]/scm/freeb/freebrep.git

I don't know why it don't work.

我不知道为什么它不起作用。

I have Admin rights on the Repo. I censored the link to the repo because its a Intern Repo with Private link hope thats ok.

我拥有 Repo 的管理员权限。我了 repo 的链接,因为它是一个带有私有链接的实习生 repo 希望没问题。

Hope someone can help me.

希望可以有人帮帮我。

回答by torek

This error message:

此错误消息:

error: remote unpack failed: unable to create temporary object directory
error: remote unpack failed: unable to create temporary object directory

indicates that the Git repository at the server(not your Git) is out of space, or running into similar server problems,1or installed incorrectly. That is, given:

表示服务器上的 Git 存储库(不是您的 Git)空间不足,或遇到类似的服务器问题,1或安装不正确。也就是说,给定:

To: http://git.int.censoredlink/scm/freeb/freebrep.git
To: http://git.int.censoredlink/scm/freeb/freebrep.git

you will have to log in to the machine that serves HTTP traffic at git.int.censoredlink, walk down to the scm/freeb/freebrep.gitdirectory, and correct the installation there. It's most likely a permissions issue: the receiving Git must be able to create, in the objects area, a directory named incoming-XXXXXXwith the Xs replaced by a unique identifier, and then create within that directory a packsubdirectory.

您必须登录到在 处提供 HTTP 流量的计算机,git.int.censoredlink向下走到该scm/freeb/freebrep.git目录,并在那里更正安装。这是最有可能是权限问题:接收的Git必须能够创建,在对象区域中,一个新的目录incoming-XXXXXXX人民共同的唯一标识符置换后,该目录中创建一个pack子目录。

All incoming objects and pack files are placed in these directories, in a sort of quarantine procedure, until the server-side Git hooks are satisfied with the reference name update requests. If the push fails, the quarantine directory is simply removed. If the push succeeds, the quarantined objects and/or pack files are migrated (and thin packs adjusted) into the normal object storage area. Note that the migration can fail even if the quarantine process succeeds; but if it does so, you get a differenterror reported to the client. (This error must also be corrected on the server.)

所有传入的对象和包文件都放置在这些目录中,在某种隔离程序中,直到服务器端 Git 钩子对引用名称更新请求感到满意为止。如果推送失败,则简单地删除隔离目录。如果推送成功,则将隔离对象和/或包文件迁移(并调整瘦包)到正常对象存储区。请注意,即使隔离过程成功,迁移也可能失败;但如果这样做,您会收到一个不同的错误报告给客户端。(此错误也必须在服务器上更正。)

Note: it's rather unusual to push to http://rather than https://or ssh://URLs. Inspect your server configuration to see who will own the various files thus created, and what permissions the web server will have.

注意:推送到http://而不是https://ssh://URL是相当不寻常的。检查您的服务器配置以查看谁将拥有由此创建的各种文件,以及 Web 服务器将拥有哪些权限。



1If a hard drive fails, Linux will sometimes mark the drive and/or its file systems read only. Or, even if you have disk space, you can run out of inodes. A number of different root causes will all lead to the same observed behavior on your client end. If you are a Linux admin checking on a server, look for system log messages, and consider both dfand df -ioutput.

1如果硬盘驱动器出现故障,Linux 有时会将驱动器和/或其文件系统标记为只读。或者,即使您有磁盘空间,也可能会耗尽 inode。许多不同的根本原因都会导致在您的客户端上观察到相同的行为。如果您是检查服务器的 Linux 管理员,请查找系统日志消息,并考虑两者dfdf -i输出。

回答by jal

I was getting the same error until I removed a .git subdirectory in the remote git repository.

在删除远程 git 存储库中的 .git 子目录之前,我遇到了同样的错误。

The .git subdir was not writable by the git login account. Initially I had a permissions problem when trying to commit, and I suspect the .git subdir was created then.

.git 子目录不能被 git 登录帐户写入。最初我在尝试提交时遇到了权限问题,我怀疑 .git 子目录是当时创建的。

回答by Ken Fallon

I got redirected here because of this error message.

由于此错误消息,我被重定向到这里。

error: remote unpack failed: unable to create temporary object directory

错误:远程解包失败:无法创建临时对象目录

FYI: This can also occur when you are mounting the git directory read only

仅供参考:当您以只读方式安装 git 目录时也会发生这种情况

eg x.x.x.x:/nas/git on /mnt/git type nfs (ro,.....

例如 x.x.x.x:/nas/git on /mnt/git type nfs (ro,.....

回答by Raj Salla

I faced the same error when i tried pushing to "censored git server". The problem was on the server side. You can wait for some time until the sever gets back online properly or just contact the admin to get it fixed :)

当我尝试推送到“的 git 服务器”时,我遇到了同样的错误。问题出在服务器端。您可以等待一段时间,直到服务器正确恢复在线状态,或者联系管理员进行修复:)