"There was an error pushing commits to GitHub" for LFS-enabled repo

When importing a public LFS-enabled GitHub repository using GitHub.com’s built-in import tool, after choosing to include the LFS files, I get the following message:

We found an error during import

We recommend restarting the import process, but if you are still having trouble contact support.

There was an error pushing commits to GitHub.

(Cancel) (Restart)

Upon clicking “Restart”, the same error occurs.

The public repository I am trying to import is the following:

I am trying to import it into a private repository for testing purposes (to test out git-lfs with authentication).

Is this error a known issue?

:wave: Welcome!

Yes - this is a known issue, and I’ve just added this to the issue so we can document it better.

Our import tool is more for importing from other version control systems than it is for git repositories. As such, it doesn’t know what to do with lfs in the origin repository.

It can recognise there are large files to handle with lfs, but when those large files are already handled as lfs in the origin repository, it all falls down.

It’s probably far simpler to clone the repository to your local system and then push it as a new repository in your GitHub account.

This article here might help:

1 Like