After migration into the new server (self-hosted instance) I have an issue connected with clone repo from the new server.
after
$ git clon example-repository
Cloning into 'example-repository'...
time="2021-11-26T12:32:05Z" level=info msg="SSL_CERT_DIR is configured" ssl_cert_dir=/opt/gitlab/embedded/ssl/certs/
remote: Enumerating objects: 1305, done.
remote: Total 1305 (delta 0), reused 0 (delta 0), pack-reused 1305
Receiving objects: 100% (1305/1305), 165.21 KiB | 929.00 KiB/s, done.
Resolving deltas: 100% (912/912), done.
warning: remote HEAD refers to nonexistent ref, unable to checkout.
$ cd example-repository
is visible only .git
directory
cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@gitlab.example.com:group/gitlab-repository.git
fetch = +refs/heads/*:refs/remotes/origin/*
ls .git/refs/heads/
is empty
to see cloned repo I need run git checkout master
output:
Branch 'master' set up to track remote branch 'master' from 'origin'.
Already on 'master'
Your branch is up-to-date with 'origin/master'.
then when I run
cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
[remote "origin"]
url = git@gitlab.example.com:group/gitlab-repository.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
ls .git/refs/heads/
master
Configuration after git checkout is expected immediately after git clone (I have them after cloning from the old server)
How I made migration:
Install 14.5.0-ce on the new server
Upgrade old server to latest version 14.5.0-ce
Copy gitlab.rb
oraz gitlab-secrets_org.json
and gilab-ctl reconfigure
gitlab-backup create SKIP=uploads,builds,registry,artifacts,pages
gitlab-backup create SKIP=db,repositories,registry
On the new server
gitlab-ctl stop puma
gitlab-ctl stop sidekiq
gitlab-backup restore backup1
gitlab-backup restore backup2
gilab-ctl reconfigure
gilab-ctl restart
Everything working ok on new server instead git cloning
The old server is on Debian 9, the new one on Debian 10
root@gitlab:~# gitlab-rake gitlab:env:info
System information
System: Debian 10
Current User: git
Using RVM: no
Ruby Version: 2.7.4p191
Gem Version: 3.1.4
Bundler Version:2.1.4
Rake Version: 13.0.6
Redis Version: 6.0.16
Git Version: 2.33.1.
Sidekiq Version:6.2.2
Go Version: unknown
GitLab information
Version: 14.5.0
Revision: f8796c0836e
Directory: /opt/gitlab/embedded/service/gitlab-rails
DB Adapter: PostgreSQL
DB Version: 12.7
URL: https://gitlab.example.com
HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git
SSH Clone URL: git@gitlab.example.com:some-group/some-project.git
Using LDAP: no
Using Omniauth: yes
Omniauth Providers:
GitLab Shell
Version: 13.22.0
Repository storage paths:
- default: /home/gitlab/git-data/repositories
GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell
Git: /opt/gitlab/embedded/bin/git
Any idea how to solve this.