Ben Chuanlong Du's Blog

It is never too late to learn.

Git Errors and Solutions

Things on this page are fragmentary and immature notes/thoughts of the author. Please read with your own judgement!

git clone throws the error message "fatal: unable to fork"

The reason is due to missing SSH.

The solution is simply to install openssh-client.

sudo apt-get install openssh

git pull throw the error message "fatal: early EOF fatal: index-pack failed"

There are a few possible reasons that caused this error.

  1. Compression runs out of memory.

  2. Poor network connection.

Below are some possible solutions to this issue.

  1. turn off compression.

    git config --global core.compression 0
    
  2. Try with a better network connection.

  3. Do a shallow clone.

    git clone --depth 1 repos_url
    

    The command trieves the latest commit.

  4. Repack remote.

  5. Use Git submodules.

Force push lead to "bad object" message from git rev-list

Run the command git fetch first and then try force push again.

https://github.com/git-lfs/git-lfs/issues/3977

https://ar.al/2019/10/19/scary-git-lfs-bad-object-error-not-so-scary-after-all/

References

Comments