当我试图跑
git push origin master --force
Run Code Online (Sandbox Code Playgroud)
我刚得到
Counting objects: 2649, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (1280/1280), done.
error: RPC failed; result=22, HTTP code = 413 | 116 KiB/s
fatal: The remote end hung up unexpectedly
Writing objects: 100% (2504/2504), 449.61 MiB | 4.19 MiB/s, done.
Total 2504 (delta 1309), reused 2242 (delta 1216)
fatal: The remote end hung up unexpectedly
Everything up-to-date
Run Code Online (Sandbox Code Playgroud)
这与不安全有关吗?我尝试在Fatal的答案中创建一个公钥:远程端意外挂断并再次运行它,但它仍然无法正常工作.我实际上没有使用钥匙吗?如果是这样,我该如何使用它?
我是Git的新手,有一个相当大的项目,我想推送到Github上的远程仓库(Repo B).最初的项目也在Github上,但来自不同的回购(Repo A).在我可以在Repo B上设置项目之前,我必须对Repo A中的文件进行一些更改.我已经设置了遥控器,ssh键等,并且在将代码库推送到Repo B时遇到了问题.
我总是得到以下错误:
$ git push <remote_repo_name> master
Enter passphrase for key '/c/ssh/.ssh/id_rsa':
Counting objects: 146106, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (35519/35519), done.
fatal: pack exceeds maximum allowed size00 GiB | 154 KiB/s
fatal: sha1 file '<stdout>' write error: Invalid arguments
error: failed to push some refs to 'git@github.com:<repo>.git
Run Code Online (Sandbox Code Playgroud)
我在本地gitconfig中更改了以下设置
git config pack.packSizeLimit 1g
git config pack.windowMemory 1g
Run Code Online (Sandbox Code Playgroud)
...并运行git gc(我看到重新组织了包,以便每个包保持在1GB的包装内).这不起作用,我得到上面看到的错误.
我试图降低每包的尺寸....
git config pack.packSizeLimit 500m
git config pack.windowMemory 500m
Run Code Online (Sandbox Code Playgroud)
...并运行git …