Cannot make github ssh key work with Jenkins version 2.176.1. cannot use Https:// clone a big repo

VM is windows 10 early version. We installed Jre_1.8.

I used to use Jenkins with git clone SSH:// it works OK. Now I need to use github, I cannot use Http// clone a big repo.
it will get following errors.

Receiving objects: 20% (15120/72030), 54.89 MiB | 1.11 MiB/s
fatal: early EOF
fatal: the remote end hung up unexpectedly
fatal: index-pack failed
error: RPC failed; curl 16 Error in the HTTP2 framing layer.


There are not a whole lot of details here, but it seems that you are cloning a repo that is somewhat large which git handles very poorly unless you have large amounts of RAM around. Have you looked into tuning you git parameters to optimize the cloning?

Something I would look into:

  • look for large files, even if they are deleted in the main branch. They will make your clones consume a lot of RAM.
  • add all sorts of binaries (exe, zip, tgz, dll, so, etc…) to .gitignore to help prevent large files uploads.
  • add a git rule to prevent files over 1MB to be uploaded.
  • run big to delete all binaries and large files from the repository history.

Git is very very very poor at managing binaries, it was designed for source code and source code only, and git-lfs is its own can of worms. So avoid large binaries in git as much as you can.

Try these settings as they should help:

    git config --global pack.windowMemory 30m
    git config --global pack.packSizeLimit 30m
    git config --global pack.deltacachesize 10m
    git config --global core.deltacachesize 10m
    git config --global core.packedgitlimit 30m
    git config --global pack.threads 2
    git config --global --add core.bigFileThreshold 500k

Reference Update: Git Server option bigFileThreshold