Clone with SSH not working properly

Greetings,
I am having the following issue when I try to clone with SSH:
fatal: ‘my repository’ does not appear to be a git repository

When I try to ssh to the same hostname using the git user I get:
PTY allocation request failed on channel 0

And that’s it. As far as I know, I am supposed to be greeted by Gitlab shell. However, the shell clearly doesn’t work as I can list files in Gitlab home directory and use other bash commands.
I tried to get file path to the repository. We are using hashed directories. Using the full file path during clone with SSH works but that is a really ugly way and I am pretty sure that is not how it should be operating.

gitlab-shell.log is empty.

Clone by HTTPS works fine.

This seems to be a problem with SSH. I expect if you restart the server the problem will go away. I experienced something like this on RHEL6 a while back, because there were way too many SSH sessions open and people weren’t closing them. A certain limit was reached and then caused this problem. Restarting SSH service I think helped the problem, as well as killing all the SSH sessions that hadn’t been disconnected.

If you can connect to the console, check how many people are logged in using the w or who commands and then kill their logins if they are old and stale.

Or the quicker way reboot.

Hi iwalker,
Thanks for the tip. Gitlab is running on Centos7. I restarted the SSH service, that did not resolve the problem. I’m not seeing any stuck sessions either.
For me it seems like it is having diffuculty tapping into gitlab-shell. I tried the command I found in the authorized_keys and that worked for some reason:
PTY allocation request failed on channel 0
/opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell key-XX
Welcome to GitLab, @NAME!