tools/* forbidden Gerrit repository name (with git lfs)?

224 views
Skip to first unread message

Mikko Paukkila

unread,
Aug 11, 2022, 6:21:30 AM8/11/22
to Repo and Gerrit Discussion
Does not work:
If you create a repository as tools/<something>, git LFS pushes will fail with HTTP/1.1 405 Method Not Allowed.

Works:
If you create a repository e.g. as 3rdparty/<something>, git LFS pushes will work fine.

From where does this limitation come from that practically tools/ should not be used as a prefix for repository names? Gerrit? lfs-plugin? git-lfs?
Could this be fixed? I have faced this issue also in past and this is related only to tools/ prefix.

Log attached.

Ps. Apache reverse proxy in between, but I don't think it impacts to this case.


gerrit_tools_repo_lfs_problem.txt

Björn Pedersen

unread,
Aug 11, 2022, 9:25:30 AM8/11/22
to Repo and Gerrit Discussion
mikko.p...@gmail.com schrieb am Donnerstag, 11. August 2022 um 12:21:30 UTC+2:
Does not work:
If you create a repository as tools/<something>, git LFS pushes will fail with HTTP/1.1 405 Method Not Allowed.

Works:
If you create a repository e.g. as 3rdparty/<something>, git LFS pushes will work fine.

From where does this limitation come from that practically tools/ should not be used as a prefix for repository names? Gerrit? lfs-plugin? git-lfs?
Could this be fixed? I have faced this issue also in past and this is related only to tools/ prefix.



You should see this on the repo settings page in the lfs section as well.

Mikko Paukkila

unread,
Aug 16, 2022, 3:26:14 AM8/16/22
to Repo and Gerrit Discussion
Yes, LFS is enabled for both repos (tools/cmake and 3rdparty/cmake in this trial) and configurations are matching. LFS works fine for >20 other repositories that we have in our Gerrit.

Both repositories have LFS Info:
Enabled: true
Max Object Size:1048576000
Read Only:false
Backend:common

Rights are inherit from the same repository so no difference there either. 

It is just that 'tools' prefix that is treated by Gerrit or plugin in some special way. But what Gerrit component causes that, I don't yet know.


Short version of the error message:

$ git push origin HEAD:refs/for/master
Remote "origin" does not support the Git LFS locking API. Consider disabling it with:
  $ git config lfs.http://company.url.com/gerrit/tools/trial.git/info/lfs.locksverify false
batch response: Client error &{%!!(string=http) %!!(string=) %!!(*url.Userinfo=<nil>) %!!(string=company.url.com) %!!(string=/gerrit/tools/trial.git/info/lfs/objects/batch) %!!(string=) %!!(bool=false) %!!(string=) %!!(string=) %!!(string=)}s(MISSING) from HTTP 405
Uploading LFS objects:   0% (0/11), 0 B | 0 B/s, done.
Reply all
Reply to author
Forward
0 new messages