- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我遇到了很多关于我的包文件的错误,这些错误看起来很隐蔽,这是一个非常可怕的交易,因为这是一个实时网站,我不确定如何处理它,也许有人可以告诉我,这是怎么回事。
似乎我缺少了一个对象,而且我的 packfile 的计数也有问题?
remote: Counting objects: 25733, done.
remote: Compressing objects: 100% (12458/12458), done.
remote: Total 19185 (delta 6914), reused 17995 (delta 6535)
Receiving objects: 100% (19185/19185), 1.69 GiB | 465 KiB/s, done.
Resolving deltas: 100% (6914/6914), completed with 1058 local objects.
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack claims to have 19185 objects while index indicates 20243 objects
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack cannot be accessed
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack claims to have 19185 objects while index indicates 20243 objects
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack cannot be accessed
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack claims to have 19185 objects while index indicates 20243 objects
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack cannot be accessed
error: unable to find e17196d88ae91dea07b4d61716b91dac581fb131
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack claims to have 19185 objects while index indicates 20243 objects
error: packfile .git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack cannot be accessed
fatal: object e17196d88ae91dea07b4d61716b91dac581fb131 not found
编辑另一个似乎已经发芽了,所以现在我有....
.git/objects/pack/pack-1f0643b00b9c201338b7f1365ef188ef682a6a9e.pack
.git/objects/pack/pack-931e28ca404e28040a10085dd1534ef12cf18c6d.pack
我已经尝试将它们复制到 www-root 之后,然后删除它们,现在正在运行 git-gc
我将尝试使用 git fetch origin
重新获取来源
git-gc
现在返回
bad sha1 file: .git/objects/05/.a2e1939ce5a53d5ec7c3cacc4df97acd09c6af.hdgIVe
bad sha1 file: .git/objects/80/.1a75684e9d869e9ed7c1ded674c55caa17c524.YUr1Yu
bad sha1 file: .git/objects/8c/.7e8381b3e0d0a1f1d4fa328f0dda0a1dbd814a.L0255H
bad sha1 file: .git/objects/c5/.32926ac2d67785cb8580b885ac3d3fd7075f57.rDsW4H
Removing stale temporary file .git/objects/pack/tmp_pack_jnP5qn
最佳答案
如“Problems with corrupt git repo ”及其 associated discussion 中所述:
Many of these objects are then packed together into a packfile to save space.You corrupted these packfiles by changing their content – even worse: changing the length of their content.
git fsck
does not actually fix anything about a git repository, it just checks for errors and reports them.git unpack-objects
on the other hand is able to unpack as much as possible from a corrupted packfile, but you will still have errors in your repo, asgit fsck --full
will report.
See "How to fix a broken repository?" or "How to remove all broken refs from a repository?".
请注意,对于 Git 2.4.3(2015 年 6 月),不再有警告 packfile .git/objects/pack/pack-xxx.pack cannot be accessed
。
这允许只关注实际错误。
请参阅 commit 319b678 [2015 年 3 月 31 日]。
(由 Jeff King (peff
) merge 到 Junio C Hamano -- gitster
-- ,2015 年 6 月 5 日)
与往常一样,Peff 的解释很有启发性:
sha1_file
: squelch "packfile cannot be accessed
" warnings
When we find an object in a packfile index, we make sure we can still open the packfile itself (or that it is already open), as it might have been deleted by a simultaneous repack.
If we can't access the packfile, we print a warning for the user and tell the caller that we don't have the object (we can then look in other packfiles, or find a loose version, before giving up).The warning we print to the user isn't really accomplishing anything, and it is potentially confusing to users.
In the normal case, it is complete noise; we find the object elsewhere, and the user does not have to care that we racily saw a packfile index that became stale. It didn't affect the operation at all.
A possibly more interesting case is when we later can't find the object, and report failure to the user. In this case the warning could be considered a clue toward that ultimate failure. But it's not really a useful clue in practice. We wouldn't even print it consistently (since we are racing with another process, we might not even see the
.idx
file,or we might win the race and open the packfile, completing the operation).This patch drops the warning entirely (not only from the
fill_pack_entry
site, but also from an identical use inpack-objects
).
If we did find the warning interesting in the error case, we could stuff it away and reveal it to the user when we laterdie()
due to the broken object. But that complexity just isn't worth it.
在 Git 2.22.1(2019 年第 3 季度)中,“git update-server-info
”曾经在其输出中留下过时的包文件,这一问题已得到纠正。
参见 commit 3c91e99 的 commit e941c48(2019 年 5 月 23 日)。
帮助:Eric Wong (ele828
) .
(由 Jeff King (peff
) 于 Junio C Hamano -- gitster
-- merge ,2019 年 7 月 25 日)
server-info
: do not list unlinked packs
Having non-existent packs in
objects/info/packs
causes dumb HTTP clients to abort.
v2
: use single loop withALLOC_GROW
as suggested by Jeff King
在 Git 2.35(2022 年第 1 季度)中,tmp-objdir API 中有一个新接口(interface),以帮助在内核中使用隔离功能。
参见 commit 776d668 和 commit ecd81df(2021 年 12 月 6 日)。
(由 commit b3cecf4 merge 到 Neeraj Singh (neerajsi-msft
) ,2022 年 1 月 3 日)
tmp-objdir
: new API for creating temporary writable databasesBased-on-patch-by: Elijah Newren
Signed-off-by: Neeraj Singh
Reviewed-by: Elijah Newren
The
tmp_objdir
API provides the ability to create temporary object directories, but was designed with the goal of having subprocesses access these object stores, followed by the main process migrating objects from it to the main object store or just deleting it.
The subprocesses would view it as their primary datastore and write to it.Here we add the
tmp_objdir_replace_primary_odb
function that replaces the current process's writable "main" object directory with the specified one.
The previous main object directory is restored in eithertmp_objdir_migrate
ortmp_objdir_destroy
.For the
--remerge-diff
usecase, add a newwill_destroy
flag instruct
object_database`` to mark ephemeral object databases that do not require fsync durability.Add '
git prune
'(man) support for removing temporary object databases, and make sure that they have a name starting withtmp_
and containing an operation-specific name.
修剪消息来自:
Removing stale temporary file ...
收件人:
Removing stale temporary directory ...
关于GIT Packfile 声称有更多对象,无法访问,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11401434/
关闭。这个问题是opinion-based 。目前不接受答案。 想要改进这个问题吗?更新问题,以便 editing this post 可以用事实和引文来回答它。 . 已关闭 4 年前。 Improv
PowerShell Web Access 允许您通过 Web 浏览器运行 PowerShell cmdlet。它显示了一个基于 Web 的控制台窗口。 有没有办法运行 cmdlet 而无需在控制台窗
我尝试在无需用户登录的情况下访问 Sharepoint 文件。 我可以通过以下任一方式获取访问 token 方法一: var client = new RestClient("https://logi
我目前正在尝试通过 Chrome 扩展程序访问 Google 服务。我的理解是,对于 JS 应用程序,Google 首选的身份验证机制是 OAuth。我的应用目前已成功通过 OAuth 向服务进行身份
假设我有纯抽象类 IHandler 和派生自它的类: class IHandler { public: virtual int process_input(char input) = 0; };
我有一个带有 ThymeLeaf 和 Dojo 的 Spring 应用程序,这给我带来了问题。当我从我的 HTML 文件中引用 CSS 文件时,它们在 Firebug 中显示为中止。但是,当我通过在地
这个问题已经有答案了: JavaScript property access: dot notation vs. brackets? (17 个回答) 已关闭 6 年前。 为什么这不起作用? func
我想将所有流量重定向到 https,只有 robot.txt 应该可以通过 http 访问。 是否可以为 robot.txt 文件创建异常(exception)? 我的 .htaccess 文件: R
我遇到了 LinkedIn OAuth2: "Unable to verify access token" 中描述的相同问题;但是,那里描述的解决方案并不能解决我的问题。 我能够成功请求访问 toke
问题 我有一个暴露给 *:8080 的 Docker 服务容器. 我无法通过 localhost:8080 访问容器. Chrome /curl无限期挂断。 但是如果我使用任何其他本地IP,我就可以访
我正在使用 Google 的 Oauth 2.0 来获取用户的 access_token,但我不知道如何将它与 imaplib 一起使用来访问收件箱。 最佳答案 下面是带有 oauth 2.0 的 I
我正在做 docker 入门指南:https://docs.docker.com/get-started/part3/#recap-and-cheat-sheet-optional docker-co
我正在尝试使用静态 IP 在 AKS 上创建一个 Web 应用程序,自然找到了一个带有 Nginx ingress controller in Azure's documentation 的解决方案。
这是我在名为 foo.js 的文件中的代码。 console.log('module.exports:', module.exports) console.log('module.id:', modu
我试图理解访问键。我读过https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-se
我正在使用 MGTwitterEngine"将 twitter 集成到我的应用程序中。它在 iOS 4.2 上运行良好。当我尝试从任何 iOS 5 设备访问 twitter 时,我遇到了身份验证 to
我试图理解访问键。我读过https://docs.aws.amazon.com/general/latest/gr/aws-sec-cred-types.html#access-keys-and-se
我正在使用以下 API 列出我的 Facebook 好友。 https://graph.facebook.com/me/friends?access_token= ??? 我想知道访问 token 过
401 Unauthorized - Show headers - { "error": { "errors": [ { "domain": "global", "reas
我已经将我的 django 应用程序部署到 heroku 并使用 Amazon s3 存储桶存储静态文件,我发现从 s3 存储桶到 heroku 获取数据没有问题。但是,当我测试查看内容存储位置时,除
我是一名优秀的程序员,十分优秀!