So I need a LFS supported git home server for a game project. However I’ve run into multiple issues trying to do this and googling for hours without a satisfying answer on what is happening. I’ll start by introducing my server implementation and the issues I’ve had with it.
-
I’ve installed an Ubuntu VM to act as the git server. I enabled ssh login and port-forwarded it so it can be accessed by our friend group outside my network. I have tested that the server is accessible to login from both inside and outside my network via SSH.
-
I installed git on the server, set up a user for it, initialized a bare repository and configured SSH following these instructions.
-
I installed git-lfs on the server via apt and enabled it on the repository I initiated with
git lfs install
running the command
git lfs env
gives me the following information
- I clone the project on my PC and enable lfs on it with the install command. Then I create an UE5 project inside the git folder, add all the file types I want to track via
git lfs track "*.*filetype*"
Then I make a commit and push it netting me this error
I disable the locking as instructed by the error, and make another push netting me this error
Now I don’t know how to proceed. What am I doing wrong? Troubleshooting this is a nuisance since the repo gets bricked after an error and I need to reset it.
I checked all the posts I could find here but they either lack answers or include third party stuff like BitKraken, which I am not using. I am not really interested in a premade server implementation for learning reasons, unless setting this up is unnecessary complicated.
2
Answers
Okay so I figured it out. The problem is that ubuntu and debian repositories link to an extremely old version of git-lfs, which does not support pure ssh protocol transfer of files. You HAVE TO use either homebrew package manager to install git-lfs or install manually from a package on git-lfs' github page.
The documentation mentions:
So make sure a
git-lfs-authenticate
is part of the default PATH on the remote server, as illustrated ingit-lfs/git-lfs
issue 2002.