3

I have GitLab CE running in Docker. After upgrading GitLab CE to version 13.5.3, its SSH stopped working. Everything else seems to be working fine.

Executing ssh git@<myhost> results in

PTY allocation request failed
sh: 1: /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell: not found

I have looked up the file in the Docker container and it exists.

I have already tried rebuilding the authorized_keys file and run a self-check in accordance to https://docs.gitlab.com/ce/administration/raketasks/maintenance.html and update file permissions as described at https://docs.gitlab.com/omnibus/docker/README.html#troubleshooting

docker exec -it gitlab gitlab-rake gitlab:shell:setup
docker exec -it gitlab gitlab-rake gitlab:check
docker exec gitlab update-permissions
docker restart gitlab

The self-check succeeded, but after all, the SSH problem persists. Has someone got an idea why the shell might be "not found"?

kappa_t
  • 31
  • 1
  • 1
    gitlab-shell is not an interactive shell, so you can't log in the container using that shell. Nevertheless, check the permissions of the file and its path are the right ones. – Jesús Ángel Nov 08 '20 at 21:57
  • @JesúsÁngel you’re right, gitlab-shell is not interactive. However, you can establish an SSH connection irrespective of the shell. The reason why I included that command and the error message is that the latter conains less unnecessary information than the git tools using SSH. The expected output of the command would be: `PTY allocation request failed Welcome to GitLab, @!` – kappa_t Nov 10 '20 at 07:55
  • @JesúsÁngel Thx, the permissions should suffice, I suppose. The directories within the path (/, /opt/, …, /opt/gitlab/embedded/service/gitlab-shell/bin/) as well as the file itself are 755. – kappa_t Nov 10 '20 at 08:07

0 Answers0