I installed Gitlab with redis, gitlab-workhorse, postgresql, nginx with TLS and ssh access according to the Arch Wiki Page via the Arch package. The system is an Arch nspawn container on an Arch host.
After adding my ssh public key in the web interface for the root user, cloning via git worked, but cloning via https with public key authentication did not, public key authentication with cloning via https didn't work either, but https cloning with password worked.
Now after an upgrade even cloning via git with public key authentication doesn't work!
After the upgrade of gitlab from version 11.1.3-1 to 11.1.4-1, it said:
directory permissions differ on /var/lib/gitlab/ filesystem: 711 package: 750
I fixed this.
I also executed the recommended command displayed after the package upgrade su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; EXECJS_RUNTIME=Disabled bundle-2.3 exec rake db:migrate RAILS_ENV=production"
as well as the after-upgrade command suggested in the ArchWiki, which misses the EXECJS_RUNTIME=Disabled
and is this: su - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:migrate RAILS_ENV=production"
Both commands were successful.
After that the restart of the gitlab services failed with
gitlab-unicorn.service: Failed at step USER spawning /usr/bin/bundle-2.3: No such process
gitlab-unicorn.service: Main process exited, code=exited, status=217/USER
Postgresql also had a similar error:
postgresql.service: Failed at step USER spawning /usr/bin/postgresql-check-db-dir: No such process
Aug 07 16:26:28 adornisventures systemd[1]: postgresql.service: Control process exited, code=exited status=217
After some restarting of the services and the website and/or repository website not even working properly (503 and 404 errors), the web functionality started working again and postgresql as well as gitlab-unicorn started normally.
When I try cloning a private or internal project via git clone [email protected]:root/privateproject.git
the error is:
Cloning into 'privateproject'...
/usr/share/webapps/gitlab-shell/lib/gitlab_net.rb:168:in `parse_who': who='-c/usr/share/webapps/gitlab-shell/bin/gitlab-shell key-3' is invalid! (ArgumentError)
from /usr/share/webapps/gitlab-shell/lib/gitlab_shell.rb:25:in `initialize'
from /usr/share/webapps/gitlab-shell/bin/gitlab-shell:20:in `new'
from /usr/share/webapps/gitlab-shell/bin/gitlab-shell:20:in `<main>'
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
My key is at the end of /var/lib/gitlab/.ssh/authorized_keys
:
command="/usr/share/webapps/gitlab-shell/bin/gitlab-shell key-3",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-ed25519 public_key_here
There seem to be sections in this file separated with hashes and there are other lines above it that have key-3
in it, but removing them and restarting the gitlab services doesn't change anything.
None of the logs in /var/log/gitlab/
have any new entries after trying to clone a repository.
How can I further debug this problem?
authorized_keys
, readding one public key via the webinterface (these alone didn't work) and returning to the previous state / downgrading ( gitlab (11.1.4-1 => 11.1.3-1) and gitlab-workhorse (5.1.0-1 => 5.0.0-1) and gitlab-gitaly (0.115.0-1 => 0.114.0-1) and gitlab-shell (2:8.1.0-1 => 2:7.1.5-1) ) and runningsu - gitlab -s /bin/sh -c "cd '/usr/share/webapps/gitlab'; bundle-2.3 exec rake db:migrate RAILS_ENV=production"
as advised in the Arch wiki has temporarily fixed the issue.