ssh: Could not resolve hostname github.com: Name or service not known; fatal: The remote end hung up unexpectedly

后端 未结 7 1675
予麋鹿
予麋鹿 2020-12-12 20:10

The process of setting up a GitHub account works just fine but it doesn\'t work when I try pushing my repository to GitHub. The error message it shows is as follows:

7条回答
  •  忘掉有多难
    2020-12-12 21:02

    I have just received this error after switching from HTTPS to SSH (for my origin remote). To fix, I simply ran the following command (for each repo):

    ssh -T git@github.com

    Upon receiving a successful response, I could fetch/push to the repo with ssh.

    I took that command from Git's Testing your SSH connection guide, which is part of the greater Connecting to GitHub with with SSH guide.

提交回复
热议问题