skip to Main Content

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.

  1. 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.

  2. I installed git on the server, set up a user for it, initialized a bare repository and configured SSH following these instructions.

  3. 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 git lfs env output

  1. 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 lfs lock error

I disable the locking as instructed by the error, and make another push netting me this error enter image description here

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


  1. Chosen as BEST ANSWER

    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.


  2. The documentation mentions:

    If Git LFS detects an SSH remote, it will run the git-lfs-authenticate command.
    This allows supporting Git servers to give the Git LFS client alternative authentication so the user does not have to setup a git credential helper.

    Git LFS runs the following command:

    $ ssh [{user}@]{server} git-lfs-authenticate {path} {operation}
    
    • The user, server, and path properties are taken from the SSH remote.
    • The operation can either be "download" or "upload". The SSH command can be tweaked with the GIT_SSH or GIT_SSH_COMMAND environment variables.

    So make sure a git-lfs-authenticate is part of the default PATH on the remote server, as illustrated in git-lfs/git-lfs issue 2002.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search