Git LFS fails with error: failed to push some refs to
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Pushing attempt with Git LFS results in when cloning, pushing or pulling/fetching, the client may fail like so:
$ git push
Git LFS: (0 of 1 files) 0 B / 5 MB
Git LFS is disabled
error: failed to push some refs to 'ssh://git@bitbucket.example.com:7999/~username/myrepo.git'
Cause
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.
Resolution
Cause #1:
A user with REPO_ADMIN permissions is able to enable LFS support. Please refer to the link below and double check it is enabled:
Cause #2:
ngnix configuration of at least one of the following directives:
client_max_body_size proxy_request_buffering
- Please refer to the article below for more details: