# 常见问题

# ping不通与请求超时

# 问题

好端端地突然无法ping通github.com,舍情况???

# 解决

  1. 管理员身份打开记事本,然后打开文件C:\Windows\System32\drivers\etc\hosts
  2. 在文件末尾加上140.82.114.4 github.com
  3. 保存,电脑重启即可恢复正常

# 解决 Git 443 端口连接失败

# 问题

执行 Git 操作时报错:

Failed to connect to github.com port 443: Couldn't connect to server

# 解决方法

# 1. 检查是否使用代理(梯子)

image-20250807183138597

  • 如果使用代理:

    git config --global http.proxy 127.0.0.1:你的端口(7897)
    git config --global https.proxy 127.0.0.1:你的端口
    
  • 如果未使用代理:

    git config --global --unset http.proxy
    git config --global --unset https.proxy
    

# 2. 刷新 DNS 缓存(可选)

ipconfig /flushdns

# 3. 重新执行 Git 操作

git push  # 或 git pull

# 总结

  • 代理问题 → 同步或清除 Git 代理设置
  • DNS 缓存 → 刷新后重试
Last Updated: 8/13/2025, 9:30:19 AM