How can I restore git repositories( just XX.git folder ) into Gitlab-Ce? When I import I get Failed trying to create XX (XX.git) Errors: {:base=>[“Failed to create repository via gitlab-shell”]}
I just have the git repositories data files(just tar the /var/opt/gitlab/git-data/repositories folder). Because the original gitlab server (virtual machine) cannot be started, I need to restore the repositories urgently.
When I try to import the repository using command: gitlab-rake gitlab:import:repos , I get the error of :Failed trying to create XX (XX.git) Errors: {:base=>[“Failed to create repository via gitlab-shell”]}
The data is very important and I beg everyone for help. thank you very much!
Production.log
[ActiveJob] [ActionMailer::DeliveryJob] [29b52e32-1b58-46ba-8c2b-944039784499] Performed ActionMailer::DeliveryJob from Sidekiq(mailers) in 1648.24ms
Raven 2.4.0 configured not to capture errors: DSN not set
Unable to save project. Error: Failed to create repository
Scheduling removal of build artifacts
StuckCiJobsWorker: Cleaning stuck builds
Started GET “/” for 2.0.1.70 at 2020-02-04 16:15:01 +0800
Processing by RootController#index as HTML
Completed 200 OK in 181ms (Views: 96.5ms | ActiveRecord: 20.4ms)
Scoped order and limit are ignored, it’s forced to be batch order and batch size
Checking GitLab Shell …
GitLab Shell version >= 5.0.4 ? … OK (5.0.4)
Repo base directory exists?
default… yes
Repo storage directories are symlinks?
default… no
Repo paths owned by git:root, or git:git?
default… yes
Repo paths access is drwxrws—?
default… yes
hooks directories in repos are links: …
ems / TEST2020 … repository is empty
Running /opt/gitlab/embedded/service/gitlab-shell/bin/check
Check GitLab API access: OK
Access to /var/opt/gitlab/.ssh/authorized_keys: OK
Send ping to redis server: OK
gitlab-shell self-check successful
Checking GitLab Shell … Finished
Checking Sidekiq …
Running? … yes
Number of Sidekiq processes … 1
Checking Sidekiq … Finished
Checking Reply by email …
Reply by email is disabled in config/gitlab.yml
Checking Reply by email … Finished
Checking LDAP …
LDAP is disabled in config/gitlab.yml
Checking LDAP … Finished
Checking GitLab …
Git configured with autocrlf=input? … yes
Database config exists? … yes
All migrations up? … yes
Database contains orphaned GroupMembers? … no
GitLab config exists? … yes
GitLab config outdated? … no
Log directory writable? … yes
Tmp directory writable? … yes
Uploads directory setup correctly? … skipped (no tmp uploads folder yet)
Init script exists? … skipped (omnibus-gitlab has no init script)
Init script up-to-date? … skipped (omnibus-gitlab has no init script)
projects have namespace: …
ems / TEST2020 … yes
Redis version >= 2.8.0? … yes
Ruby version >= 2.1.0 ? … yes (2.3.3)
Your git bin path is “/opt/gitlab/embedded/bin/git”
Git version >= 2.7.3 ? … yes (2.11.1)
Active users: 1
Checking GitLab … Finished