Reputation: 538
I am running into this error when trying to push commits with lfs to my gitlab server. I am on the latest version of git version 2.24.0.windows.2
. I am not exactly sure what the problem is. I have no problem pushing commits when I on other branches that do not have anything committed with git-lfs.
Fatal error: Server error: http://gitlab.mywebsite.com/username/project.git/gitlab-lfs/objects/1fc3d99946b26bc1c3d02092f07f5378c648f786eafa482a1b0edde4389fd618/480
error: failed to push some refs to '[email protected]:Apullins/Text_Adventure.git'
Upvotes: 1
Views: 1038
Reputation: 538
I figured out what the problem was. My GitLab was two major versions behind. Git-LFS is fairly new so my GitLab server had no idea how to handle my Git-LFS pushes.
I found out that upgrading GitLab to the latest version is not as easy as an apt-get install Latest version. No, after version 10.8 and onwards GitLab restricts you from upgrading more than one major version and even then you must be on the latest minor version in that major version inorder to upgrade to the next major version.
From version 10.8 onwards, upgrade paths are enforced for version upgrades by default. This restricts performing direct upgrades that skip major versions (for example 10.3 to 12.7 in one jump) which can result in breakage of the GitLab installations due to multiple reasons like deprecated or removed configuration settings, upgrade of internal tools and libraries etc. Users will have to follow the official upgrade recommendations while upgrading their GitLab instances.
From Upgrade-Recommendations
When upgrading GitLab it is recommended that you upgrade to the latest minor version in your current major version, then upgrade to the next major version and repeat. So if you are on
8.13.4
you should upgrade to8.17.7
then you can upgrade to9.5.10
.
So what this meant for me is that I needed to go from version 10.8.7 to 8.17.7 then I could upgrade to 11.3.4 so that I could upgrade to 11.11.3 then I could upgrade to 12.0.2 so that I could upgrade to 12.4.2.
Todo this on Ubuntu run these commands.
apt-get install gitlab-ce=<YOUR-LATEST-MINOR-VERSION>-ce.0
gitlab-ctl reconfigure
gitlab-ctl restart````
It is kinda tedious and takes a while but I did not encounter any problems while upgrading.
Upvotes: 1