Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remote: fatal: non-blob object size limit exceeded (tree b825a38cdfaa660569b011557b01d304882c3e41 is 57301083 bytes) error: remote unpack failed: index-pack abnormal exit #2

Closed
englianhu opened this issue Sep 21, 2022 · 14 comments

Comments

@englianhu
Copy link
Owner

englianhu commented Sep 21, 2022

binary

Enumerating objects: 58120, done.
Counting objects: 100% (58120/58120), done.
Delta compression using up to 4 threads
Compressing objects: 100% (33153/33153), done.
Writing objects: 100% (58107/58107), 25.44 MiB | 1.37 MiB/s, done.
Total 58107 (delta 24966), reused 58092 (delta 24954), pack-reused 0
remote: fatal: non-blob object size limit exceeded (tree b825a38cdfaa660569b011557b01d304882c3e41 is 57301083 bytes)        
error: remote unpack failed: index-pack abnormal exit
To github.com:englianhu/binary.com-interview-question-data.git
 ! [remote rejected]         世博量化研究院 -> 世博量化研究院 (failed)
error: failed to push some refs to 'github.com:englianhu/binary.com-interview-question-data.git'
@englianhu
Copy link
Owner Author

englianhu commented Sep 22, 2022

昨天我进行整理了kawaks的游戏rom; 整个rom下载下来超4G;在通过ssh上传到git时,一直报remote: fatal: pack exceeds maximum allowed size错误;

项目地址:https://github.com/Game-Emulators/Kawaks-ROMs

通过搜索,找到了git上传文件的方法,git-lfs项目;

项目网站:https://git-lfs.github.com

项目介绍:Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.

大概解决思路:

下载git-lfs插件:apt install git-lfs
然后按照网站上的指引进行配置,并重新提交;
详细可以参考官方文档;
官方步骤:
git-lfs

引用:git 上传大文件;remote: fatal: pack exceeds maximum allowed size


Git在推送到远端的时候,出现以下错误信息:
remote: fatal: pack exceeds maximum allowed size
原因是由于单个文件过大,导致推送失败

解决方案
把大文件使用git-lfs管理
具体操作方法:
打开该git根目录下的.gitattributes文件(这个文件默认是隐藏的)
在文件中添加一行:大文件名称 filter=lfs diff=lfs merge=lfs -text
保存,重新提交(原来推送失败的那一次提交作废了,必须把大文件和.gitattributes一并提交才可以推送成功)

版权声明:本文为CSDN博主「Rayyyyyyyyy」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:Git push推送出现remote: fatal: pack exceeds maximum allowed size问题解决版本

这儿尝试安装更新,出现以下错误信息。

englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git init
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo apt install git-lfs
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git lfs install
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git init
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git lfs track '*.rds' ##track文件后,`./git`文件夹内就出现`.gitattributes`文件如上所述
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git add .gitattributes
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git init
重新初始化已存在的 Git 仓库于 /home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git add .

Files don't match:
/home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/lfs/objects/23/fa/23fa64129829be0b402928ee5dd7d56359e0e95220942a449cffa7b668bd525c
/home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/lfs/tmp/568908112
error: 外部过滤器 'git-lfs filter-process' 失败
fatal: 文艺数据库/fx/USDJPY/仓库/120/季平滑_MNN_数据量1200_频率120_2017-03-13 04:44:00CST.rds:clean 过滤器 'lfs' 失败

@englianhu
Copy link
Owner Author

我收到一个大项目。客户想把它添加到github。

我在一点一点地加。后来我变得贪婪,一次添加了太多的文件。现在,不管我怎么努力,我总是会犯这个错误。我怎样才能解决这个问题?我试图后退,但也许我做错了。

$ git push
Enter passphrase for key '/c/Users/guestaccount/.ssh/id_rsa':
Enumerating objects: 35931, done.
Counting objects: 100% (35931/35931), done.
Delta compression using up to 12 threads
Compressing objects: 100% (35856/35856), done.
remote: fatal: pack exceeds maximum allowed size
fatal: sha1 file '<stdout>' write error: Broken pipe
error: remote unpack failed: index-pack abnormal exit
To github.com:(mygithubid)/(repo).git
 ! [remote rejected]   main -> main (failed)
error: failed to push some refs to 'github.com:(mygithubid)/(repo).git'

我使用visualstudio代码和gitbash上传。

引用:Git Push remote:致命:包超出了允许的最大大小


尝试使用vscode不过不晓得gitbase为啥?

> git status -z -uall
Files don't match:
/home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/lfs/objects/23/fa/23fa64129829be0b402928ee5dd7d56359e0e95220942a449cffa7b668bd525c
/home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/lfs/tmp/4117609690
error: 外部过滤器 'git-lfs filter-process' 失败
fatal: 文艺数据库/fx/USDJPY/仓库/120/季平滑_MNN_数据量1200_频率120_2017-03-13 04:44:00CST.rds:clean 过滤器 'lfs' 失败

@englianhu
Copy link
Owner Author

englianhu commented Sep 23, 2022

git config --global http.postBuffer 157286400

引用:Git Push Fails - fatal: The remote end hung up unexpectedly

git config --global http.postBuffer 524288000
git config --global https.postBuffer 524288000

引用:【CSDN】解决gitlab限制上传大小文件的问题

Make sure that you have the Git command-line client installed, version >= 2.6. NOTE: git-sizer invokes git commands to examine the contents of your repository, so it is required that the git command be in your PATH when you run git-sizer.

Install git-sizer. Either:

a. Install a released version of git-sizer(recommended):

Go to the releases page and download the ZIP file corresponding to your platform.
Unzip the file.
Move the executable file (git-sizer or git-sizer.exe) into your PATH.
b. Build and install from source. See the instructions in docs/BUILDING.md.

Change to the directory containing a full, non-shallow clone of the Git repository that you'd like to analyze. Then run

git-sizer [...]
No options are required. You can learn about available options by typing git-sizer -h or by reading on.

Pro tip: If you add git-sizer to your PATH, then you can run it by typing either git-sizer or git sizer. In the latter case, it is found and run for you by Git, and you can add extra Git options between the two words, like git -C /path/to/my/repo sizer. If you don't add git-sizer to your PATH, then of course you need to type its full path and filename to run it; e.g., /path/to/bin/git-sizer. In either case, the git executable must be in your PATH.

引用:猫舍:github/git-sizer

$ which git-sizer
/usr/bin/git-sizer
$ sudo chmod a+x /usr/bin/git-sizer
$ sudo cp /usr/bin/git-sizer /home/englianhu/文档/GitHub/binary.com-interview-question-data/
$ sudo chmod a+x /home/englianhu/文档/GitHub/binary.com-interview-question-data/git-sizer

有时候使用git的时候,会提示这个信息

warning: There are too many unreachable loose objects; run 'git prune' to remove them.

原因是因为提交的改动过多,导致本地的缓冲区占用太大。
``
可以执行这行命令,清理优化本地的 git 项目

git gc  --prune=now 

然后就可以正常使用了
————————————————

版权声明:本文为CSDN博主「前方丶」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:git gc的使用

参考文献

@englianhu
Copy link
Owner Author

englianhu commented Sep 23, 2022

englianhu@Scibrokes:~$ cd /home/englianhu/文档/GitHub/binary.com-interview-question-data/
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch *.rds'    
WARNING: git-filter-branch has a glut of gotchas generating mangled history
         rewrites.  Hit Ctrl-C before proceeding to abort, then use an
         alternative filtering tool such as 'git filter-repo'
         (https://github.com/newren/git-filter-repo/) instead.  See the
         filter-branch manual page for more details; to squelch this warning,
         set FILTER_BRANCH_SQUELCH_WARNING=1.
Proceeding with filter-branch...


Files dont match:
/home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/lfs/objects/23/fa/23fa64129829be0b402928ee5dd7d56359e0e95220942a449cffa7b668bd525c
/home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/lfs/tmp/982713981
error: 外部过滤器 'git-lfs filter-process' 失败
fatal: 文艺数据库/fx/USDJPY/仓库/120/季平滑_MNN_数据量1200_频率120_2017-03-13 04:44:00CST.rdsclean 过滤器 'lfs' 失败
不能重写分支:您有未暂存的变更。
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ 
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git config --global http.postBuffer 157286400
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git config --global http.postBuffer 524288000
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git config --global https.postBuffer 524288000
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git -v
git version 2.37.3
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git init
已重新初始化已存在的 Git 仓库于 /home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git push
Remote "origin" does not support the Git LFS locking API. Consider disabling it with:
  $ git config lfs.https://github.com/englianhu/binary.com-interview-question-data.git/info/lfs.locksverify false
Post "https://lfs.github.com/englianhu/binary.com-interview-question-data/locks/verify": dial tcp: lookup lfs.github.com: i/o timeout
error: 无法推送一些引用到 'github.com:englianhu/binary.com-interview-question-data.git'
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git gc --prune=now
枚举对象中: 1648878, 完成.
对象计数中: 100% (1648878/1648878), 完成.
使用 4 个线程进行压缩
压缩对象中: 100% (738016/738016), 完成.
写入对象中: 100% (1648878/1648878), 完成.
总共 1648878(差异 911264),复用 1648473(差异 910859),包复用 0
正在删除重复对象: 100% (256/256), 完成.
正在检查连通性: 1648878, 完成.

englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo git push origin 世博量化研究院
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo git push origin 世博量化研究院
[email protected]: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。

@englianhu
Copy link
Owner Author

englianhu commented Sep 23, 2022

以下参考文献阐明ssh公钥的权限问题,可以授权或者重新建立新公钥,随便上网搜索公钥产生器如Generate SSH Keys Onlineopenssl终端或者通过RStudio,也能新建公钥。

##生成RSA密钥对

在本例中,我们将生成一个 2048 位 RSA 密钥对。较短的密钥不足以抵御暴力猜测攻击,如 1024 位。 更长的密钥则有点过度,例如 4096 位。长远来看,随着计算机处理 成本变得更便宜,密钥长度会增加。目前 2048 是最佳长度。

用于生成 RSA 密钥对的命令为:

openssl genrsa -out rsa_private.key 2048
openssl rsa -in rsa_private.key -out rsa_public.key -pubout

这将在当前目录下生成私钥文件rsa_private.key和公钥文件rsa_public.key

##生成自签名证书

这里我们提供了一个脚本供开发者生成自签名的证书,开发者可以根据自己的信息修改脚本,然后在服务器上运行即可...

引用:WeDemo生成密钥与自签名证书指南

englianhu@Scibrokes:~$ openssl genrsa -out rsa_private.key 2048
Generating RSA private key, 2048 bit long modulus (2 primes)
..................................................................................................................................+++++
............................................................................................+++++
e is 65537 (0x010001)
englianhu@Scibrokes:~$ openssl rsa -in rsa_private.key -out rsa_public.key -pubout
writing RSA key

@englianhu
Copy link
Owner Author

englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo git lfs push origin 世博量化研究院
Remote "origin" does not support the Git LFS locking API. Consider disabling it with:
  $ git config lfs.https://github.com/englianhu/binary.com-interview-question-data.git/info/lfs.locksverify false
ssh: Could not resolve hostname github.com: Temporary failure in name resolution: exit status 255

@englianhu
Copy link
Owner Author

englianhu commented Sep 23, 2022

$ sudo git push origin 世博量化研究院
The authenticity of host 'github.com (20.205.243.166)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo git push origin 世博量化研究院
[email protected]: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。
englianhu@Scibrokes:~/文档/GitHub/library$ cd
englianhu@Scibrokes:~$ ssh-agent -s
SSH_AUTH_SOCK=/tmp/ssh-y3pxpqQFAMit/agent.25490; export SSH_AUTH_SOCK;
SSH_AGENT_PID=25491; export SSH_AGENT_PID;
echo Agent pid 25491;
englianhu@Scibrokes:~$ ssh-add ~/.ssh/id_rsa
Identity added: /home/englianhu/.ssh/id_rsa (englianhu@Scibrokes)
englianhu@Scibrokes:~$ eval `ssh-agent -s`
Agent pid 25567
englianhu@Scibrokes:~$ ssh-add ~/.ssh/id_rsa
Identity added: /home/englianhu/.ssh/id_rsa (englianhu@Scibrokes)
englianhu@Scibrokes:~$ ssh -T git@github.com

Hi englianhu! You've successfully authenticated, but GitHub does not provide shell access.

引用:解决[email protected]: Permission denied (publickey)

englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo chmod -R 777 /home/englianhu/文档/GitHub/binary.com-interview-question-data/

englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ 
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo git push --force
git@github.com: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。

@englianhu
Copy link
Owner Author

englianhu commented Sep 29, 2022

Description

I would like to see the possibility to select multiple files in the changes view

Version

GitHub Desktop version: 0.5.8 OS version: Windows 7

Steps to Reproduce

github for windows github for windows

Here you can see I would like to do :

  1. Select first file
  2. press shift
  3. Select second file everything in between gets selected
  4. Right click on selection and click discard

Something similar to this : github for windows2 github for windows2

Expected behaviour: When I click the second file, every file in between would be selected

Actual behaviour: The first file gets deselected (basically you can select only one file at a time) Reproduces how often: 100%

Originally posted by @stevenbriscoeca in desktop/desktop#1799 (comment)


    +1 for multiple selection in the Changes tab

Also, GitHub Desktop for Mac app had a menu item, Repository > Discard Changes to Selected Files, that effectively enabled the discard operation on multiple files:

screen_shot_2017-05-25_at_11_17_55_am

This menu item is missing in the current beta:

screen_shot_2017-05-25_at_11_20_00_am

Originally posted by @joewiz in desktop/desktop#1712 (comment)


如何通过台式猫城(GitHub Desktop)一次性多选文件

一般上通过台式猫城(GitHub Desktop)多选文件需要手动逐个打勾非常费事,倘若有好几万个文件就麻烦许多;欲一次性打勾选择多文件的话... 对于数量超额或者体积过大的解决方案,可以通过台式猫城(GitHub Desktop):

猫城(一次性多选 discard)
猫城(一次性多选 include)
猫城(一次性多选 include)2
猫城(一次性多选 include)3

  • Discard(销毁文件用途)
  • Include / exclude(打勾上推/下拉用途)
  1. 打勾首个文件
  2. 长按shift字键
  3. 打勾想要选择到达的最终文件
  4. 右键选择Include字键(间中所有文件将会被打勾列入名单)

@englianhu englianhu reopened this Sep 29, 2022
@englianhu
Copy link
Owner Author

englianhu commented Sep 29, 2022

First, you can use git-sizer to get an idea of what is taking too much space in your current local repository (that you fail to push)

  • if it is because of a commit too big, you can:

    • git reset @~ to cancel that commit
    • remake several smaller commits
    • try and push again
  • if it is because of a file too big, you can try and activate Git LFS, but that is limited by quota and going above might include a non-free service.

More generally, a "large project" might need to be split up into several Git repositories.


Note tat, with Git 2.36 (Q2 2022), when "index-pack" dies due to incoming data exceeding the maximum allowed input size, it will include the value of the limit in the error message.

You will be able to split your commits more effectively knowing the remote limit. (Assuming the remote server does use Git 2.36+)

See commit 0cf5fbc (24 Feb 2022) by Matt Cooper (vtbassmatt).
(Merged by Junio C Hamano -- gitster -- in commit 283e4e7, 06 Mar 2022)

index-pack: clarify the breached limit

Helped-by: Taylor Blau
Helped-by: Derrick Stolee
Signed-off-by: Matt Cooper

As a small courtesy to users, report what limit was breached.
This is especially useful when a push exceeds a server-defined limit, since the user is unlikely to have configured the limit (their host did).

	if (max_input_size && consumed_bytes > max_input_size) {
		struct strbuf size_limit = STRBUF_INIT;
		strbuf_humanise_bytes(&size_limit, max_input_size);
		die(_("pack exceeds maximum allowed size (%s)"),
		    size_limit.buf);
	}

引用:StackOverflow栈溢出:Git Push remote: fatal: pack exceeds maximum allowed size(有GitHub猫舍官网代码与说明)

众所周知,猫城应用使用日本红宝石编程语言,向来都有体积大小限制,而以上官网有代码证实新版台式猫城应用有频率限制,就不晓得如何修改max_input_size && consumed_bytes > max_input_size为无穷,或者使用旧版没有任何限制的台式猫城应用。


参考文献


参考文献:

@englianhu
Copy link
Owner Author

englianhu commented Sep 30, 2022


Screenshot_20220930_235204

englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ git init && git push --force
重新初始化已存在的 Git 仓库于 /home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/
枚举对象: 43160, 完成.
对象计数中: 100% (43160/43160), 完成.
使用 4 个线程进行压缩
压缩对象中: 100% (24506/24506), 完成.
写入对象中: 100% (43154/43154), 8.74 MiB | 208.00 KiB/s, 完成.
总共 43154 (差异 18653),复用 43149 (差异 18648remote: fatal: non-blob object size limit exceeded (tree ba091585fbaff2960c701f9f5c31a75f584e70d2 is 56271480 bytes)
error: 远程解包失败:index-pack abnormal exit
To github.com:englianhu/binary.com-interview-question-data.git
 ! [remote rejected]         世博量化研究院 -> 世博量化研究院 (failed)
error: 推送一些引用到 '[email protected]:englianhu/binary.com-interview-question-data.git' 失败
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo git init && sudo git push --force
重新初始化已存在的 Git 仓库于 /home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/
The authenticity of host 'github.com (140.82.114.3)' can't be established.
ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,140.82.114.3' (ECDSA) to the list of known hosts.
[email protected]: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。
englianhu@Scibrokes:~/文档/GitHub/binary.com-interview-question-data$ sudo git init && sudo git push --force
重新初始化已存在的 Git 仓库于 /home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/
[email protected]: Permission denied (publickey).
fatal: 无法读取远程仓库。

请确认您有正确的访问权限并且仓库存在。

平时只使用RSA而未曾使用过(ECDSA),而回教徒911恐怖份子起坛作法、施展巫术、窥听窥视、入侵电子仪器、篡改代码、下降头、草菅人命,需要依照可兰经回教刑事法典断肢法处死~

@englianhu
Copy link
Owner Author

englianhu commented Sep 30, 2022

$ sudo apt install -y git-sizer
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  libboost-dev liblog4shib-dev
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
  git-sizer
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 779 kB 的归档。
解压缩后会消耗 2,515 kB 的额外空间。
获取:1 https://mirrors.bfsu.edu.cn/debian buster/main amd64 git-sizer amd64 1.3.0+dfsg-1 [779 kB]
已下载 779 kB,耗时 2秒 (499 kB/s)
正在选中未选择的软件包 git-sizer。
(正在读取数据库 ... 系统当前共安装有 580008 个文件和目录。)
准备解压 .../git-sizer_1.3.0+dfsg-1_amd64.deb  ...
正在解压 git-sizer (1.3.0+dfsg-1) ...
正在设置 git-sizer (1.3.0+dfsg-1) ...

$ which git-sizer
/usr/bin/git-sizer

$ sudo chmod a+x /usr/bin/git-sizer
$ sudo apt install git-lfs
正在读取软件包列表... 完成
正在分析软件包的依赖关系树       
正在读取状态信息... 完成       
下列软件包是自动安装的并且现在不需要了:
  libboost-dev liblog4shib-dev
使用'sudo apt autoremove'来卸载它(它们)。
下列【新】软件包将被安装:
  git-lfs
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
需要下载 2,899 kB 的归档。
解压缩后会消耗 9,731 kB 的额外空间。
获取:1 https://mirrors.bfsu.edu.cn/debian buster/main amd64 git-lfs amd64 2.7.1-1+deb10u1 [2,899 kB]
已下载 2,899 kB,耗时 4秒 (769 kB/s)                 
正在选中未选择的软件包 git-lfs。
(正在读取数据库 ... 系统当前共安装有 579963 个文件和目录。)
准备解压 .../git-lfs_2.7.1-1+deb10u1_amd64.deb  ...
正在解压 git-lfs (2.7.1-1+deb10u1) ...
正在设置 git-lfs (2.7.1-1+deb10u1) ...
正在处理用于 man-db (2.8.5-2) 的触发器 ...

$ git init && git lfs install
重新初始化已存在的 Git 仓库于 /home/englianhu/文档/GitHub/binary.com-interview-question-data/.git/
Updated git hooks.
Git LFS initialized.

$ cd /home/englianhu/文档/GitHub/binary.com-interview-question-data/
$ git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch 文艺数据库/fx/USDJPY/仓库/*.rds'

Rewrite 64daab8cdad1cbf5a85847cad41cbc62cfb06d2b (1/322) (0 seconds passed, remaining 0 Rewrite
1e0080134cae6f136ddf610a8685b63c4767b8a0 (2/322) (0 seconds passed, remaining 0 Rewrite
679dd80ec0b0d5899088ffacfa2d6a67f5311ebd (3/322) (0 seconds passed, remaining 0 Rewrite
bdfb179ef54a9a247afb1bd59b60b5edb271dc3d (4/322) (0 seconds passed, remaining 0 Rewrite
cf8b8b27193603968761bd92c23c30c96e2ab2de (5/322) (0 seconds passed, remaining 0 Rewrite
f63071caa4bdb67f09ffdfb719327d63a27b1bc6 (6/322) (0 seconds passed, remaining 0 Rewrite
762c075f4d6c372b42fac644ba86de2e0b21f9a1 (7/322) (0 seconds passed, remaining 0 Rewrite
df2a37c60bec13ea4b2d017530ffa45fbbad73b9 (8/322) (1 seconds passed, remaining 39Rewrite
e5c9e06017b4721aa61a6f2775e0b94c5b84afea (8/322) (1 seconds passed, remaining 39Rewrite
16e66848c8d015156c997f2674ca48f70632601b (8/322) (1 seconds passed, remaining 39Rewrite
6bd50840edf326b05a71f4fe439f51313a443366 (8/322) (1 seconds passed, remaining 39Rewrite
2a04a151f7d00be711d34dd3090bf4e75574fe90 (8/322) (1 seconds passed, remaining 39Rewrite
7ed5c1768496893822792c9cc9930041995007de (8/322) (1 seconds passed, remaining 39Rewrite
0b3354832d609af18b4fd23ce83a7ae3e0c88ae3 (8/322) (1 seconds passed, remaining 39Rewrite
a1217c5919a4e6d8777f6fa712c8c586dbaef45b (8/322) (1 seconds passed, remaining 39Rewrite
0cb3008168aa9e1fcb2cd0986198a717e557fa4b (8/322) (1 seconds passed, remaining 39Rewrite
e6787176f147f1f56427e6b87c688366bbfebd78 (17/322) (7 seconds passed, remaining 1Rewrite
bb1473001ea20f23c20006cded53a1cd0800aaf8 (17/322) (7 seconds passed, remaining 1Rewrite
4e1a444f2e4426202b5f14f955976493aef8591b (17/322) (7 seconds passed, remaining 1Rewrite
200e1620bf75a618bd7c440164c4ed75158df4d9 (20/322) (11 seconds passed, remaining Rewrite
715324583c7da8c2280f7609699557498febcf15 (20/322) (11 seconds passed, remaining Rewrite
2f05a540a04c68d5d944fbb588ec89ad76f8dc0d (22/322) (12 seconds passed, remaining Rewrite
802cfd3ab537176325f4c9e603ee933591bec676 (22/322) (12 seconds passed, remaining Rewrite
1faa42630c24462759a36cb27a91ea3d6c536dd7 (24/322) (14 seconds passed, remaining Rewrite
6d2f06cd10de7efb6bb2cd9a7bfe753ef5aa7ad6 (24/322) (14 seconds passed, remaining Rewrite
8070a439381e918a2ffba365539ce20085bac947 (26/322) (15 seconds passed, remaining Rewrite
39ecd7550cf81682e4d5cde1532743503f1b18ad (26/322) (15 seconds passed, remaining Rewrite
ae5a9d0697535f661fc4cb302d4a3b0df4109e88 (28/322) (17 seconds passed, remaining Rewrite
59633df14989c2caeef2a0586822bca2e3c47a95 (28/322) (17 seconds passed, remaining Rewrite
e790242f17cd2dec614d77675076e849e059f95a (30/322) (19 seconds passed, remaining Rewrite
24b98670dd6147551267cbe2a0465e0ffd9ab8e9 (30/322) (19 seconds passed, remaining Rewrite
a0ef4786b0ece909cb7c53d80672c4a34bdcd22e (32/322) (20 seconds passed, remaining Rewrite
d4132a9acb6e65336012c1bad417791b4900e2aa (32/322) (20 seconds passed, remaining Rewrite
edaefb500852c6b5de713ebb9da93dd6748b8d75 (34/322) (22 seconds passed, remaining Rewrite
56a0fbc2c64210a3fbd4700423db01f731ffcb18 (34/322) (22 seconds passed, remaining Rewrite
acbf78e3440ff37ce5055c248dde7df130034479 (36/322) (24 seconds passed, remaining Rewrite
c0640472552bbffc8ea80fbbd2bd64b0472b0013 (36/322) (24 seconds passed, remaining Rewrite
1fc9e286601c9c41ad75eebad25f56bb8b95def2 (38/322) (26 seconds passed, remaining Rewrite
b6053a70ba64251b9cbd6e266f0e04e144084b21 (38/322) (26 seconds passed, remaining Rewrite
05b9b0456121dce019beceb1ba18705f92282a0f (40/322) (27 seconds passed, remaining Rewrite
5067a6ba85822136ed3469c348fcb025be9167cf (40/322) (27 seconds passed, remaining Rewrite
b8b24f23baf93306a40f8bb94a1186e95a790dfc (42/322) (29 seconds passed, remaining Rewrite
2c9c1da978503c14a28a5de58124aa8cd2ede7f8 (42/322) (29 seconds passed, remaining Rewrite
0365630547930f95a9eba7ad57c3ea20505264df (44/322) (31 seconds passed, remaining Rewrite
31d64af87dde6bf4f3019766c06f7ed1b0012f1c (44/322) (31 seconds passed, remaining Rewrite
f40ffbd25a77de5009001ade733fd536ccee4fb6 (46/322) (33 seconds passed, remaining Rewrite
f7bd3d134ff5a79604e040bcc66cffdbc539c63d (46/322) (33 seconds passed, remaining Rewrite
c4a6b75fc4fa0062fa6d434bab3e5e69eef11cdb (48/322) (35 seconds passed, remaining Rewrite
811b3019868d64571e6f22b9f50d9832dfb0ba8e (48/322) (35 seconds passed, remaining Rewrite
13421595a16c1d5768edbf607d550d241ce763a5 (50/322) (37 seconds passed, remaining Rewrite
8c44ab4faf666e409f68cf26fff211a8a26b209a (50/322) (37 seconds passed, remaining Rewrite
fb800656fe409d516d5a69ccb847834073e588e7 (52/322) (38 seconds passed, remaining Rewrite
5256a995e123664384a726983767aed7de640a19 (52/322) (38 seconds passed, remaining Rewrite
7259ccca1edfb8eb6caf775139b4154126ac95f9 (54/322) (41 seconds passed, remaining Rewrite
36a06b63ca2b47a6da59a3d261dc1e4579f774b4 (54/322) (41 seconds passed, remaining Rewrite
833b8ca3151bef05dfe1b3f3ce24a3cf59918a19 (56/322) (43 seconds passed, remaining Rewrite
9bacb3831a42e2a208aff6d542064eb8587309c7 (56/322) (43 seconds passed, remaining Rewrite
2dcb3a0e7d60632aac2fdd56b869f3f2fc21cc1f (58/322) (44 seconds passed, remaining Rewrite
e39d798055e4854c443cad4873c22434286f8c60 (58/322) (44 seconds passed, remaining Rewrite
f4c591b998b39030b202eeea09534ab8dfa2a8dc (60/322) (46 seconds passed, remaining Rewrite
630c569fc1a9e7ecda21101fd1d2f42b923c8123 (60/322) (46 seconds passed, remaining Rewrite
a9695a196ad7153d8c00222867bb58bdbafc23b3 (62/322) (48 seconds passed, remaining Rewrite
838611185f1a6780c34e4c443d0c7528d3ced65f (62/322) (48 seconds passed, remaining Rewrite
12d21cc225ca59055988817573849f6a8db37155 (64/322) (50 seconds passed, remaining Rewrite
852b57f79025ec6a0b48e4e859e6bcc2f0f1e82d (64/322) (50 seconds passed, remaining Rewrite
f5d11de6d332cb821ae9cd8ae1bfb628adb89583 (66/322) (51 seconds passed, remaining Rewrite
d0b0a7b303902069466a78a72cbc1d9f9cbaa4b0 (66/322) (51 seconds passed, remaining Rewrite
cf56c96f7eee3f71cc2a11929eed67ecc7f73270 (68/322) (53 seconds passed, remaining Rewrite
a5ce4dff64149c37b0202ed71d061e442fc2a30c (68/322) (53 seconds passed, remaining Rewrite
c40746a06ce91f7dc2375570ee37af5e7b32cc61 (70/322) (149 seconds passed, remainingRewrite
bb5a932ec846309754a6298bcc8a440329bdb6b7 (71/322) (150 seconds passed, remainingRewrite
20e07752a356b06bf57231f117092ddeb82d9f4d (72/322) (151 seconds passed, remainingRewrite
248624d1d95382408b22ce9edfabdd7b8f7c4d57 (73/322) (152 seconds passed, remainingRewrite
179a48639eb200d70ac4059a0f93a9f5a0b48004 (74/322) (153 seconds passed, remainingRewrite
c55a773f7bb6b23f58d89c3bf8e7710ade08ccfc (75/322) (154 seconds passed, remainingRewrite
08e398560135c45c6edf538680aafcf28788bbe2 (76/322) (155 seconds passed, remainingRewrite
8f0a22831f9203e49f8bea6bd02412145000e436 (77/322) (156 seconds passed, remainingRewrite
ed30ed6de18f52cbe3adef097be6729a30ca1780 (78/322) (158 seconds passed, remainingRewrite
e84d0bc8ce4ebcf18518f646b8a3070192985a43 (79/322) (159 seconds passed, remainingRewrite
b68c7149ad34328ca28d10c2509e262b3d7bde74 (80/322) (161 seconds passed, remainingRewrite
99afaa77df7bbdc95c1416db242d701554727eb2 (81/322) (163 seconds passed, remainingRewrite
47f57701635e2ca4778504b2c770f119595c27e8 (82/322) (165 seconds passed, remainingRewrite
0a354c39a481399de10560fda5df7eba8cb1e430 (83/322) (176 seconds passed, remainingRewrite
6fe9c4a6daa2ec732698c7e2abff430fc9407fec (84/322) (186 seconds passed, remainingRewrite
d12083f87f73b7d950c928f5505e05c06daa05ee (85/322) (190 seconds passed, remainingRewrite
96d59bbad34a517d6247d9be25b0ec822c05fcb0 (86/322) (197 seconds passed, remainingRewrite
6cb78893646b7ac4c6936a651f3eb6bc230105d5 (87/322) (204 seconds passed, remainingRewrite
71184853d456288659e9a68b40b032e8ce6f6b65 (88/322) (208 seconds passed, remainingRewrite
74334d652fa27cbdfec702d1ec1ed203ed47204d (89/322) (210 seconds passed, remainingRewrite
e8a93cae9a13d43e623422ca28383b01886da73e (90/322) (213 seconds passed, remainingRewrite
4153ace106bef24b1442b75aba9f117effb3b5b9 (91/322) (216 seconds passed, remainingRewrite
aa3d971acd63769b824136df43886d58373270c6 (92/322) (219 seconds passed, remainingRewrite
55fe35c9d3f8920f407f43ddfec2182ce7eae73b (93/322) (222 seconds passed, remainingRewrite
9fc7d3d108759688358a1ae06882165e7c647578 (94/322) (225 seconds passed, remaining 545 predicted)

Rewrite 46470406b0a0e7c5f3e6f0d3f6658dc46188f715 (95/322) (809 seconds passed, remaining 1933 predicted)

Rewrite 40fb40cb03f9979d398b687b270085c4595f03ce (96/322) (4902 seconds passed, remaininRewrite
93bc2769b7aff027fdc99c1dfc85195db61e69c3 (97/322) (6914 seconds passed, remaininRewrite
94f26906938a1240a6dec4bc82cdb762269c0fbc (98/322) (8146 seconds passed, remaininRewrite
afa94ed745470fb49d8b5dc1016aa0a3dd1b42c9 (99/322) (11418 seconds passed, remainiRewrite
3900df09a393115951e40ebebf484eb7253997ed (100/322) (12584 seconds passed, remainRewrite
3c749d04f00f646e7605bcfeb7f2cea8638cc008 (101/322) (13533 seconds passed, remainRewrite
36d80f3e1b0fc22da49a0a8d25ca59517a6027f3 (102/322) (13836 seconds passed, remainRewrite
a783891033f7d0510dc7ce1a7c533db9cbafc06e (103/322) (14471 seconds passed, remainRewrite
6af03c7410c165c3419426e285c9c26d99c0b383 (104/322) (14984 seconds passed, remainRewrite
b89121d205bac54b887967bd16587e215e8d94d4 (105/322) (14986 seconds passed, remainRewrite
b1a41e8a52a2c17f56e7670fa832f00bb0707643 (106/322) (14990 seconds passed, remainRewrite
1700def02076b0c7a1b4ba78d3f942ea2e29bae6 (107/322) (14993 seconds passed, remainRewrite
22c53892c22e59022127af12e45b72a2e2ea0f7b (108/322) (14996 seconds passed, remainRewrite
88b6eb08a88389f384f4d3c77faf1b96cb935d7e (109/322) (14999 seconds passed, remainRewrite
80f5bee0d47140333bbc66d1057a10ec05c12017 (110/322) (15008 seconds passed, remainRewrite
d4e689933e7b3bb5d416e8d53d213d50230f0c07 (111/322) (15011 seconds passed, remaining 28534 predicted) 
...
...
...

$ git add .gitattributes

@englianhu
Copy link
Owner Author

englianhu commented Oct 8, 2022

昨天我进行整理了kawaks的游戏rom; 整个rom下载下来超4G;在通过ssh上传到git时,一直报remote: fatal: pack exceeds maximum allowed size错误;
项目地址:https://github.com/Game-Emulators/Kawaks-ROMs
通过搜索,找到了git上传文件的方法,git-lfs项目;
项目网站:https://git-lfs.github.com
项目介绍:Git Large File Storage (LFS) replaces large files such as audio samples, videos, datasets, and graphics with text pointers inside Git, while storing the file contents on a remote server like GitHub.com or GitHub Enterprise.
大概解决思路:
下载git-lfs插件:apt install git-lfs
然后按照网站上的指引进行配置,并重新提交;
详细可以参考官方文档;
官方步骤:
git-lfs

引用:git 上传大文件;remote: fatal: pack exceeds maximum allowed size

Git在推送到远端的时候,出现以下错误信息:
remote: fatal: pack exceeds maximum allowed size
原因是由于单个文件过大,导致推送失败
解决方案
把大文件使用git-lfs管理
具体操作方法:
打开该git根目录下的.gitattributes文件(这个文件默认是隐藏的)
在文件中添加一行:大文件名称 filter=lfs diff=lfs merge=lfs -text
保存,重新提交(原来推送失败的那一次提交作废了,必须把大文件和.gitattributes一并提交才可以推送成功)

版权声明:本文为CSDN博主「Rayyyyyyyyy」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:Git push推送出现remote: fatal: pack exceeds maximum allowed size问题解决版本
...
...
...

🚩如上所述,需要事先扫描过滤大体积文件后缀后,添加个.gitattributes再委托,推送... 如果未扫描添加.gitattributes就先委托就会出现exceed file size limit的错误信息,可以参考以下git reset --soft HEAD~1来退回前一个委托,而~3则退回三个步骤。

 git reset HEAD^            # 回退所有内容到上一个版本  
 git reset HEAD^ hello.php  # 回退 hello.php 文件的版本到上一个版本  
 git  reset  052e           # 回退到指定版本
## --soft 参数用于回退到某个版本:
git reset --soft HEAD

## 实例:
git reset --soft HEAD~3   # 回退上上上一个版本 

引用:欲知更多详情,请查阅Runoob.com中git reset命令

🚩步骤都对了,然后目前出现四次错误信息如下,提示需要签购付费配套...

englianhu@Scibrokes:~/文档/GitHub/img$ git push
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
batch response: This repository is over its data quota. Account responsible for LFS bandwidth should purchase more data packs to restore access.
error: 推送一些引用到 '[email protected]:englianhu/img.git' 失败

@englianhu
Copy link
Owner Author

猫城设置(授权公钥推拉权限)

到猫城设置,授权公钥推拉权限,再次推拉。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant