Git LFS

30 views
Skip to first unread message

Zsolt Fehér

unread,
Apr 2, 2022, 9:28:04 AM4/2/22
to Nexus Users
Hey Guys,

Could someone help me please?

I try to use nexus as a stateless server, I have a git lfs repository configured, and I download the uploaded components. If I start a brand new empty server, I would like to upload this Git LFS components again to the server. Git client can do this work with 'push' command, so I thought I could do it also. But nexus is tricky in that way, and the upload operation via REST API is "Not allowed".
I can see in the request log 3 request regarding the git push upload.

POST /repository/<my-repo>/info/lfs/objects/batch HTTP/1.1"
PUT /repository/<my-repo>/<component-hash> HTTP/1.1"
POST /repository/<my-repo>/<component-hash>/verify HTTP/1.1"

I'm not able to find out the 3 exact request here.
To the first request with no content I see this in the log:
Invalid request: POST /info/lfs/objects/batch: org.sonatype.nexus.repository.gitlfs.internal.GitLfsRequestException: Cannot process JSON for Git LFS request: No content to map due to end-of-input
I think it is a flag maybe to handle multiple file upload
The PUT request is definitely the Git LFS file
The last is just to verify the upload obviously
How could I make this work?
Have anyone any idea?

Thank you!

Best
Zsolt Fehér

Matthew Piggott

unread,
Apr 7, 2022, 1:20:24 PM4/7/22
to Nexus Users, Zsolt Fehér
You need to exactly emulate the behaviour of the git lfs client, I don't know the protocol offhand to suggest more than that.
Reply all
Reply to author
Forward
0 new messages