Note that there are some explanatory texts on larger screens.

plurals
  1. POWhat to do about "PTY allocation request failed on channel 0"
    primarykey
    data
    text
    <p>I can't see to wrap my head creating an ssh key for GitHub. I had it working quite awhile back but I can't figure out what has changed. I've since removed the previous SSH keys from my GitHub account. After following the instructions several times for generating an SSH key (<a href="http://help.github.com/mac-key-setup" rel="noreferrer">http://help.github.com/mac-key-setup</a>) and testing "ssh git@github.com" I get the following; </p> <blockquote> <p>PTY allocation request failed on channel 0 ERROR: Hi...successfully authenticated...GitHub does not provide shell access...Connection to github.com closed.</p> </blockquote> <p>I reviewed the <a href="http://help.github.com/troubleshooting-ssh/" rel="noreferrer">troubleshooting guide</a> and noticed that my ssh directory didn't have a config file. After creating it I'm unsure of what or how to enter the local path on the IdentityFile line. I'm not even sure whether this is necessary in my case? </p> <blockquote> <p>If your github authentication information is different from your machine account information, you’ll need to modify your ssh configuration file.</p> <p>Create or open the file at ~/.ssh/config Add the following lines:</p> </blockquote> <pre><code>Host github.com User git Hostname github.com PreferredAuthentications publickey IdentityFile [local path to private key half of github public key you provided] </code></pre> <blockquote> <p>You may also need to update the permissions on your .ssh folder and its contents. The SSH application will ignore secret files that are too permissive.</p> </blockquote> <pre><code>$ chmod 700 ~/.ssh $ chmod 600 ~/.ssh/* </code></pre> <p>I also ran ssh -v git@github.com the results of which can be seen here <a href="http://gist.github.com/607283" rel="noreferrer">http://gist.github.com/607283</a> nothing different from what I can tell.</p> <p>Any idea what I'm doing wrong? </p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COThe “PTY allocation request failed” warning is innocuous when using command-line *ssh* to login to a service that does not provide normal interactive access. Git-over-SSH does not need a tty and GitHub’s SSH service is configured to refuse to allocate one for incoming connections. You can tell *ssh* not to ask for a tty with `ssh -T git@github.com`. As the next message says, your authentication is working fine. Are you having any problems actually using Git to access GitHub over SSH?
      singulars
    2. COThanks Chris - best explanation I've heard yet. I understand the first part of your comment. I guess the related problem is that when I try to create a new repository and "git push origin master" I return the following "Error: Permission to myemail@address.com/myapp denied to myusername. Fatal: the remote end hung up unexpectedly" So I'm not sure where in the process I'm failing...I thought it was my ssh key. Should I continue to try the ssh -T git@github.com as you suggested?
      singulars
    3. COWe see the “successfully authenticated” message, so there is no need to continue to try to directly *ssh* into GitHub. I mentioned the `-T` option to demonstrate that the “PTY allocation” message does not indicate a hard failure (you get the same “successfully authenticated” message whether you run with `-T` or not). I will write more about the real problem in an answer.
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload