Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

After I installed Gitolite onto my Synology DiskStation NAS as per these instructions:

I realized that I managed to install gitolite, but for whatever reason I was not able to run the installation using the user "git" - but I was able to do so as "root"

After installing, I logged out. But now every time I tried to login via ssh again: $ ssh root@iptonas

I got this error: PTY allocation request failed on channel 0

I read somewhere that gitolite disables ssh logins now? How else can I get back into shell..?

share|improve this question
Did my previous answer worked? – VonC May 31 '12 at 7:19
up vote 2 down vote accepted
error: PTY allocation request failed on channel 0

Perfectly normal, expected, and not blocking (ie the ssh operation would pursue)

However, you did the installation as root, which is bad, especially when you consider the ssh Gitolite page:

If you're installing gitolite, you're a "system admin", like it or not.
If you're using the default ssh mode (i.e., not http mode), ssh is a necessary skill. Please take the time to learn at least enough to get passwordless access working.

The key aspect to understand in Gitolite is its usage of forced command, in order to deny interactive shell and to intercept any command (including the git commands), allowing it to enforce access control to Git repos.

That means your ~root/.ssh/authorized_keys file contains line with:

command="/devit_home/users/vobadm/gitpoc/ce7/gitolite/bin/gitolite-shell gitoliteadm",no-port-forwarding,no-X11-for        warding,no-agent-forwarding,no-pty ssh-rsa AAAAB3N

The no-port-forwarding is responsible for that warning message "PTY allocation request failed on channel 0". But that doesn't prevent Gitolite operations to run properly.

See "how does gitolite use all this ssh magic?".

For ssh issue, look into "SSH troubleshooting".
You need to gain access to your server by another way than ssh, and remove the line beginning by command in ~root/.ssh/authorized_keys.

Do you know how I might use Telnet to redo the gitolite installation process?

Once logged as root:

  • remove the line beginning by command in the ~root/.ssh/authorized_keys file.
  • make sure your root public key is registered in that same file (so without any 'command=' in front of it.

That will ensure a root access through ss.

Then redo the installation, but with a sudo git first.
you must be 'git' when doing that installation.

You must first generate on the client side an git private ssh key and a public key.
Copy the public key on the server: you will pass that public key to the gitolite install command.

And as Ryan mentions in his answer, uses

DiskStation> /volume1/homes/git/gitolite/install -ln

(in order to link the installation to ~git/bin instead of the "system path root-protected" /bin directory).

share|improve this answer
Thank you! That clarifies things a bit. But what do you mean exactly by 'it's bad that I installed via root'? What are the ramifications? And is there a way to take a step back and redo it properly? – Jay May 31 '12 at 16:28
@Jay The inconvenience of a root installation is the possibility to lock oneself out of the server (is ssh access is all you have). You can simply repeat the installation process, but this time with a 'sudo git' first. – VonC May 31 '12 at 16:48
Well, the other option is Telnet, but I have no idea what that is. So yeah, I think I've locked myself out. Is there a way to undo that? – Jay May 31 '12 at 18:06
@Jay no way that I know of, but explorer that telnet option (it is a service like ssh except without encryption). Try a telnet @ip_of_your_server and see if you can connect that way. – VonC May 31 '12 at 18:29
Ok, I'm able to login via Telnet it looks like. Do you know how I might use Telnet to redo the gitolite installation process? Thank you very much for all your help!! – Jay Jun 1 '12 at 0:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.