I just set up a new gitlab group and a fresh private gitlab repo in that group. I am attempting to create a project from an existing folder.
The problem
I deleted the .git folder containing all of the git history from the existing folder. Then I created the gitlab repository, executed
git init
git remote add origin git@gitlab.com:my_group_username/my-repo.git
git add .
git commit -m "initial commit"
git push origin master
I got this error:
! [remote rejected] master -> master (pre-receive hook declined)
What I have tried
- I checked to make sure the master branch isn't protected. It's not.
- I checked to see what webhooks are configured. There are none.
- I tried pushing to a new branch, not named master
- I checked my user configuration with
git config list
and my user info is configured as expected.
- I deleted the repo, recreated it, and tried to push. Same issue.
- I checked to make sure that my gitlab user is configured as a contributor. I am the owner of the project.
- I even created a Github repo in the same way, and was able to push my commits to that repo without any issues.
Any ideas what might be causing this error?
Edit - git push command and output:
git push -u origin --all
Enumerating objects: 31, done.
Counting objects: 100% (31/31), done.
Delta compression using up to 12 threads
Compressing objects: 100% (24/24), done.
Writing objects: 100% (31/31), 78.73 KiB | 8.75 MiB/s, done.
Total 31 (delta 0), reused 0 (delta 0)
remote: GitLab: LFS objects are missing. Ensure LFS is properly set up or try a manual "git lfs push --all".
To gitlab.com:dellacortelab/prospr.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'git@gitlab.com:dellacortelab/prospr.git'
Looking at this again, it looks like there is an issue with LFS (large file storage), but the repository is only 1.5 Mb in size. It originally did have some large files, but I deleted them before deleting the .git folder, so I don't know how gitlab would know about them.
Update:
There was a reference to LFS files in my .gitattributes file, so I deleted the .gitattributes file and the directory that it referenced, but I still got the same error.
Removed .gitattributes file:
potts/plmDCA_asymmetric/plmDCA_asymmetric.ctf filter=lfs diff=lfs merge=lfs -text