connection refused error when pushing lfs files

Viewed 745

I tracked some of my files with git lfs, but pushing it to remote failed with following message:

batch response: Post https://my_remote_repository/my_project.git/info/lfs/objects/batch: dial tcp (ip address):443: connect: connection refused
Uploading LFS objects:   0% (0/7), 0 B | 0 B/s, done.
error: failed to push some refs to 'https://my_remote_repository/my_project.git'

How can I resolve this?

1 Answers

That seems an issue on the remote side (the "my_remote_repository" hosting server)

As seen in "Git LFS fails with error: failed to push some refs to"

Cause #1:

This indicates the repository does not have LFS enabled. A user with REPO_ADMIN permissions is able to enable LFS support.

Cause #2:

When pushing large files through a reverse proxy to Bitbucket server, ngnix has been found guilty of this issue due 2 specific configurations that need to be tweaked for it.

You might not be using BitBucket, but the HTTPS listener on your remote side might be rejecting a file pushed because of its size.

Check also if this help, as seen here:

git config --global lfs.contenttype 0
Related