当前位置:   article > 正文

ssh: Could not resolve hostname ssh.github.com: Temporary failure in name resolutionfatal: Could no_ssh: could not resolve hostname c: temporary failu

ssh: could not resolve hostname c: temporary failure in name resolution

报错

执行git push origin dev,重试多次都是报错:

ssh: Could not resolve hostname ssh.github.com: Temporary failure in name resolution fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

诊断

ping: www.qq.com: Temporary failure in name resolution

修改配置

sudo vi /etc/resolv.conf

  1. # This file was automatically generated by WSL. To stop automatic generation of this file, add the following entry to /etc/wsl.conf:
  2. # [network]
  3. # generateResolvConf = false
  4. nameserver 8.8.8.8

重启

 sudo systemctl restart systemd-resolved.service

再执行即可成功!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/我家自动化/article/detail/907287
推荐阅读
相关标签
  

闽ICP备14008679号