GitLab LFS v.2.0 Locking Feature does not work, pls help :(

Hello @ all.

I am new in this community and I am using GIT now for a while.

I read about the locking ability of GIT LFS 2.0 and I wanted to test this ability by locking binary files from modification.
I wanted to use GIT for my study project, where I am using simulink models that I want to track with GIT LFS (simulink models are binary files). Merging with binary files, especially complex models in Simulink, is very complicated. So the announced locking feature of GIT LFS 2.0 would be a pleasure to avoid that two people make changes on the same model without communicating. The lock flag should give only a hint to the developer, that somebody else is also working on the same model.

By the way, I love GIT and its philosopy. But sometimes, there are occasions where I think that a locking feature would not be bad.

I am currently using GitLab CE 9.3.6 that is running on a Virtual Machine.
It is said, that a GIT LFS Server is implemented in GitLab.
In the GIT Repository on the GitLab Server Web GUI, there is an entry “Git Lab” that is set to “Enable”.
I am using an HTTPS address to communicate with the GIT Lab Server.

On my client I am using GIT LFS v. 2.2.1 with GIT 2.13.3.windows.1.
I am using the Bash console.

I started a project on the GitLab Server and tracked some PSD Files (For Testing) with GIT LFS with the command
“git lfs track *.psd’ lockable”.
A .gitattribute file is created then.

Then I added the files to stage, commit them into my local repository and pushed them to server with
“git push origin master”
what actually worked.

Then, when I try to lock a file with
“git lfs lock file.psd”.
After launching the command, a credential window appears where I put in my username and password with what I am registered on my GitLab Server.
But, the following message appears (With GIT_TRACE=1):

$ GIT_TRACE=1 git lfs lock file.psd
09:12:55.375400 git.c:547 trace: exec: ‘git-lfs’ ‘lock’ ‘file.psd’
09:12:55.375400 run-command.c:626 trace: run_command: ‘git-lfs’ ‘lock’ ‘file.psd’
trace git-lfs: run_command: ‘git’ config -l
trace git-lfs: creds: git credential fill (“https”, “”, “GMT/TestLFS.git”)
trace git-lfs: Filled credentials for https://servername/GMT/TestLFS.git
trace git-lfs: HTTP: POST https://servername/GMT/TestLFS.git/locks
trace git-lfs: HTTP: 404
Lock failed: Repository or object not found: https://servername/GMT/TestLFS.git/locks
Check that it exists and that you have proper access to it

When I type
“git lfs locks”
to check, if any locks have been done, the windows credential manager appears asking for username and password again. When I put in my username and password that I am using to log in into GitLab Web GUI, the credential manager window closes and opens again every time asking me again username and password but without that anything happens.
After closing the window with cancel, git bash gives me the following message (with GIT_TRACE=1):

$ GIT_TRACE=1 git lfs locks
09:12:03.287901 git.c:547 trace: exec: ‘git-lfs’ ‘locks’
09:12:03.287901 run-command.c:626 trace: run_command: ‘git-lfs’ ‘locks’
trace git-lfs: run_command: ‘git’ config -l
trace git-lfs: creds: git credential fill (“https”, “”, “GMT/TestLFS.git”)
trace git-lfs: Filled credentials for https://servername/GMT/TestLFS.git
trace git-lfs: HTTP: GET https://servername/GMT/TestLFS.git/locks
trace git-lfs: HTTP: 401
trace git-lfs: HTTP: {“error”:“You need to sign in or sign up before continuing.”}
trace git-lfs: api: http response indicates “basic” authentication. Resubmitting…
trace git-lfs: creds: git credential fill (“https”, “”, “GMT/TestLFS.git”)
Error while retrieving locks: Git credentials for https://servername/GMT/TestLFS.git not found.

  • What should I do to get the locking ability work?
  • Has GitLab the newest LFS Version installed? How can I check this?

I thought I would do everything as described in the documentation :(.

  • Am I doing something wrong?

I hope you can help me.

Best regards,
Giuseppe

Hello Giuseppe,
I believe this is not supported yet but should be available soon. This feature is discussed here: https://gitlab.com/gitlab-org/gitlab-ee/issues/1830

Thanks @alexander-frolov . Unfortunately, I see this would be only available for EE. Hope this update will come also for CE.