git - WSL 中的 Git 命令有时无法解析 URL
问题描述
我的 windows10 机器中的 WSL 有时无法解析某些 URL。
观察到执行 git 命令时出现问题。主要是这样的命令:
git pull --ff-only
git push
它无法从 github.com 和 go.googlesource.com 拉取。但 ping 正常工作:
ping go.googlesource.com
推送到 Azure DevOps(通过 ssh)时也会失败。错误显示:
ssh: Could not resolve hostname ssh.dev.azure.com: Name or service not known
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
重要的:
此问题仅在某些时候出现。当 git push 尝试 azure devops 失败时,重试 2-3 次后,第四次推送成功。
有人可以帮我解决这个问题吗?
解决方案
推荐阅读
- javascript - 如何在浏览器版本对数组中找到最小的版本号?
- adonis.js - 我们如何在发布请求中接受文件并将其上传到 Adonis JS 中的 mysql?
- php - 将值作为文本返回到 textarea
- python - 从电子邮件中获取 HTML 的问题:我只收到一串字符
- excel - 如何在excel中绘制汇总图
- linux - 创建目录并将图像上传到远程 Web 服务器
- javascript - AWSDateTime 为可读格式
- mysql - 我将如何托管多个与 Heroku 共享相同 Mysql 数据库的 Spring Boot Web 应用程序?
- sql - 如何让日期时间不插入表中
- reactjs - 触发父评论状态变化的倒计时时间