6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

【エラー】ssh: Could not resolve hostname github: nodename nor servname provided, or not known fatal: Could not read from remote repository.

Posted at

発生したエラー


 % git clone https://github.com/xxx/yyy.git

を実行すると以下のエラーメッセージが


Cloning into 'yyy'...
ssh: Could not resolve hostname github: nodename nor servname provided, or not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

解決策

.gitconfigが悪さをしていそうなので削除


ファイルの存在確認
 % ls -la ~/ | grep git
-rw-r--r--   1 mo    staff        84  2  4 08:07 .gitconfig

発見したので削除
% rm ~/.gitconfig

参考

6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?