I want to post some code to the Github, but it tell me "Permission to xxx.git denied to user.", so I solve it by add a ssh to the Github, when I check it by "ssh -T git@github.com", it tells me "Host key verification failed.", so I delete all files in "~/.ssh" and rebuild an ssh to Github, now I cant's see known_hosts anymore. I want to solve two things, one is look known_hosts file on my mac again, second is solve the permission deny to Github from my mac. Who can help me? Thinks!
Asked
Active
Viewed 1,949 times
0
-
The `known_hosts` file is created and updated on the local host by `ssh` when you connect to a remote host. Don't worry about it. – axiac Dec 19 '17 at 13:50
-
@axiac I think you misunderstand. The OP wants the file back... – evolutionxbox Dec 19 '17 at 14:10
-
@evolutionxbox: *so I delete all files in "~/.ssh"* -- the file is gone. It will be recreated and updated by `ssh` when needed. It doesn't store any information needed to connect to other hosts. It stores the keys of the hosts `ssh` contacted in the past. Also, it is not guilty for the OP not being able to connect to Github. It is just a cache, after all. – axiac Dec 19 '17 at 14:42
-
Have you looked at the following question? https://stackoverflow.com/questions/13363553/git-error-host-key-verification-failed-when-connecting-to-remote-repository – evolutionxbox Dec 19 '17 at 15:07
-
I doesn't know how do I fix it, but it works now.Thanks you all. – Adrenine Dec 23 '17 at 05:46