Cross-posted to Stack Overflow (https://stackoverflow.com/questions/67265757)
I’ve created a local GitLab instance (GitLab 13.10 in Ubuntu 20) and want to import but not mirror a project from GitHub. In this instance openwrt. I created the project in the GitLab instance and then tried to push to it.
I ran:
git clone https://git.openwrt.org/openwrt/openwrt.git
git remote rename origin old-origin
git remote add origin http://gitlab.local/group/project.git
git push -u origin --all
And I got:
Counting objects: 533132, done.
Delta compression using up to 8 threads.
Compressing objects: 100% (142241/142241), done.
Writing objects: 100% (533132/533132), 162.16 MiB | 6.35 MiB/s, done.
Total 533132 (delta 369475), reused 530420 (delta 368128)
remote: Resolving deltas: 100% (369475/369475), done.
remote: Checking connectivity: 533132, done.
remote: GitLab: Push operation timed out
remote:
remote: Timing information for debugging purposes:
remote: Running checks for ref: master
remote: Checking if you are allowed to push... (22.92ms)
remote: Checking if default branch is being deleted... (0.77ms)
remote: Checking if you are force pushing to a protected branch... (579.48ms)
remote: Checking if you are allowed to push to the protected branch... (21.38ms)
remote: Scanning repository for blobs stored in LFS and verifying their files have been uploaded to GitLab... (cancelled after 29409.76ms)
To http://gitlab.local/group/project.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://gitlab.local/group/project.git'
I’ve done the same with another project and the push worked fine, so I think there’s something it doesn’t like with this project. There are 9210 files in the project, so I’ve assumed it’s something to do with lots of files.
Things I’ve tried:
- I’ve gone through just about every log I can find, but there are no errors on the server.
- I’ve increased all the timeouts I could find, but it didn’t seem to help
- Increased memory to 8192MB
- Increased the puma worker max memory from 865MB to 4096MB
- Using git instead of http (tried that first…)
- setting the lfs endpoint to use http rather than https (
git config --add lfs.url "http://gitlab.local/group/project.git/info/lfs"
though I’m not sure this did anything, setting it to “wibble:wobble” didn’t make it fail in any spectacular way) - Googling the errors
- Searching the GitLab forums and issues for hits (Unable to import a very large project with LFS objects into Gitlab-CE instance (#326893) · Issues · GitLab.org / GitLab · GitLab looks interesting, but I don’t think mine is that large)
I don’t think there should be any files in there on LFS, the largest file is 4KB. But since the error mentions LFS I thought I’d play with those settings.
I finally found this in the gitaly logs:
{"correlation_id":"01F46PRCPB7Y470Q3HFJNK4S2X","error":"rpc error: code = Canceled desc = signal: terminated","grpc.code":"Canceled","grpc.meta.auth_version":"v2","grpc.meta.client_name":"gitlab-web","grpc.meta.deadline_type
":"regular","grpc.method":"GetNewLFSPointers","grpc.request.deadline":"2021-04-26T09:04:58.013Z","grpc.request.fullMethod":"/gitaly.BlobService/GetNewLFSPointers","grpc.request.glProjectPath":"group/project","grpc.request.glReposit
ory":"project-2","grpc.request.repoPath":"@hashed/d4/73/d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35.git","grpc.request.repoStorage":"default","grpc.request.topLevelGroup":"@hashed","grpc.service":"gitaly.BlobService","
grpc.start_time":"2021-04-26T09:04:28.214Z","grpc.time_ms":30047.092,"level":"info","msg":"finished streaming call with code Canceled","peer.address":"@","pid":12659,"remote_ip":"127.0.0.1","span.kind":"server","system":"grpc","time":"2021
-04-26T09:04:58.261Z","username":"<me>"}
But it doesn’t point me to something I can debug…
Any help appreciated; I’m tearing my hair out.