gpt4 book ai didi

git - 越来越致命 : object is corrupted when pushing to a remote repo

转载 作者:太空狗 更新时间:2023-10-29 13:36:35 26 4
gpt4 key购买 nike

我有一台安装了 Gitolite 的服务器来托管我的存储库 我昨天和今天创建了一个新的存储库,当我试图将更多提交推送到我得到的服务器时:

fatal: object 86eeaa0c5a154ff3df34d6a43669930b9c6c7f59 is corrupted
error: unpack failed: unpack-objects abnormal exit
error: failed to push some refs to

由于 repo 很新,我不太担心丢失以前的提交,所以我删除了我的本地和远程 repo ,但仍然遇到相同的错误。

正如我所说,我不太关心维护我的提交历史,我只是想让它再次工作!

最佳答案

如评论中所示,任何其他 repo 在其创建过程中都存在问题(即当使用声明新 repo 的 gitolite-admin 文件推回 gitolite.conf repo 时)

I didn't notice this before but when I create a new repo I'm getting the following error:

remote: line 1 too long: command="/home/git/gitolite/src/gitolite... 
remote: FATAL: fingerprinting failed for /tmp/Cdug9Itivq

But it's creating the repo in /home/git/repositories

此操作发生在名为 ssh-authkeys 的编译后触发器中:

sub fp_file {
return $selinux++ if $selinux; # return a unique "fingerprint" to prevent noise
my $f = shift;
my $fp = `ssh-keygen -l -f '$f'`;
chomp($fp);
_die "fingerprinting failed for '$f'" unless $fp =~ /([0-9a-f][0-9a-f](:[0-9a-f][0-9a-f])+)/;
$fp = $1;
return $fp;
}

这意味着 ssh-keygen -l -f <path_to_public_key.pub>不遵循正确的模式,如“self service key management”所示。

确保您的 key 是这样生成的:

ssh-keygen -t rsa -f "${H}/.ssh/git" -C "Gitolite Admin access (not interactive)" -q -P ""

2015 年 4 月更新:

starfry 所述在“Gitolite - remote: FATAL: fingerprinting failed for 'keydir/'”中:

There was a change to the key fingerprint format in OpenSSH at version 6.8:

Add FingerprintHash option to ssh(1) and sshd(8), and equivalent command-line flags to the other tools to control algorithm used for key fingerprints. The default changes from MD5 to SHA256 and format from hex to base64.

Fingerprints now have the hash algorithm prepended.
An example of the new format:

SHA256:mVPwvezndPv/ARoIadVY98vAC0g+P/5633yTC4d/wXE

Please note that visual host keys will also be different.

The latest git checkout of gitolite is aware, since 18th March '15, of this new format.

关于git - 越来越致命 : object is corrupted when pushing to a remote repo,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10736767/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com