Cannot push a remote repo init with LFS to a bare GitLab repo

I’m having an issue with remote GitLab and initializing LFS.

I use GitKraken as my git client, and it has LFS built into the GUI, so I use it init LFS on my local repos.
How I use remote repos is that I create a bare repo on GitLab, then I add the URL to my local one as the remote origin. I do this because I want the root git be the same directory as my root Unity project, and neither GitKraken nor Unity will create a project in a directory that already has stuff in it. So I make the Unity project first, then git init from git bash the root project directory, then add the remote URL.

The problem I’m facing is that the remote repo rejects my initial pushes when I have my local repo init with LFS. A non LFS repo will push fine to GitLab without error, but a LFS repo will say “Push Failed pre-receive hook declined”
My searches have me thinking the message means it’s a permissions error, but I have no idea where in Gitlab to configure LFS, so I’ve been doing it locally.

I’m a little peeved at Gitlab right now because somehow all my LFS files got corrupted trying to force this local repo onto GItLab.

My local master branch would not push to my origin which doesn’t have a master yet because of “pre-received hook declined”. So I made a local develop branch from my local master, then init a remote master on GitLab. Pulled down the master, and pushed up the develop. Now at this point GitKraken won’t merge these branches. I was getting some kind of bug with the branch options context menu. So I merged these branches on GItLab, pulled down the new master, and now all my LFS files are F&#$%D.

It seems like they weren’t even pushed to the LFS server when I pushed the develop branch. BY the time I pulled the merged master I had to re-commit all my LFS files.

So now I’m here trying to figure out LFS on GitLab properly before I lose more of my project.

1 Like