Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
Host github.com git 
HostName github.com
user git
IdentityFile ~/.ssh/github //I've tried also /home/freinn/.shh/github

There's no /home/freinn/github file created, have I to create it?

That's the complete warning:

Warning: Identity file /home/freinn/github not accessible: No such file or directory.
Hi freinn! You've successfully authenticated, but GitHub does not provide shell access.

[freinn@freinn ruby]$ ssh -v git@github
OpenSSH_5.9p1, OpenSSL 1.0.0j-fips 10 May 2012
debug1: Reading configuration data /home/freinn/.ssh/config
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 50: Applying options for *
ssh: Could not resolve hostname github: Name or service not known
share|improve this question
add comment

1 Answer

To get SSH authentication working for GitHub, you need to create a public/private key pair as per GitHub's instructions. The IdentityFile option should point at whatever file contains the private key you created while performing those instructions.

It looks like you're connecting just fine anyway* — you're seeing GitHub's successful connection message. Maybe your GitHub private key is just ~/.ssh/id_rsa? If so, you could remove the IdentityFile line altogether and it'll work as expected.

If it's any help, the relevant section of my ~/.ssh/config/ looks as follows:

Host github.com
    IdentityFile ~/.ssh/id_rsa_github
    IdentitiesOnly yes

…but that works only because ~/.ssh/id_rsa_github is where I put my GitHub-specific private RSA key.

*GitHub always responds with You've successfully authenticated, but GitHub does not provide shell access. when you successfuly ssh in from a shell.

share|improve this answer
    
It doesn't work. Same warning even entering "IdentitiesOnly yes" line –  freinn Oct 5 '12 at 10:10
    
What is ‘it’? Deleting the IdentityFile line altogether? Copying my entry verbatim was never going to work because, as I said, it works only because ~/.ssh/id_rsa_github is where I put my GitHub-specific private RSA key. Again, it looks like you're authenticating just fine, you should be able to ditch the IdentityFile line altogether. –  Iain Dawson Oct 5 '12 at 10:23
    
I have to have the github file in /home/freinn/ and don't know why ssh search there... –  freinn Oct 5 '12 at 10:27
    
Again, ssh is looking for and finding the relevant RSA key. You wouldn't get the You've successfully authenticated… message were that not the case. Your IdentityFile entry is almost certainly redundant, as ssh complains about it and then ultimately ignores it. If you could update your ssh -v output to git@github.com rather than git@github, we'd know for sure. But it's probably irrelevant, as getting rid of the IdentityFile line will likely stop the error message. –  Iain Dawson Oct 5 '12 at 10:36
    
If I quit the line IdentityFile it gives Warning: Identity file /home/freinn/github not accessible: No such file or directory. Permission denied (publickey). –  freinn Oct 5 '12 at 10:48
show 2 more comments

Your Answer

 
discard

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.