一元网络论坛

 找回密码
 立即注册
搜索
热搜: 活动 交友 discuz
查看: 118|回复: 0

网络问题导致 Git 提交失败,如何解决?

[复制链接]

2万

主题

3万

帖子

9万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
90545
发表于 2024-8-22 17:06:03 | 显示全部楼层 |阅读模式
问题描述
我使用 Visual Studio Code 在本地开发项目,但在上传代码时经常遇到错误,有时好有时坏。
错误示例


Git 错误信息
以下是部分错误信息:





> git pull --tags origin main
fatal: unable to access 'https://github.com/LXJGZS/ltmt.git/': gnutls_handshake() failed: The TLS connection was non-properly terminated.

Ping Github 结果
~$ ping github.com
PING github.com (140.82.112.3) 56(84) bytes of data.
64 bytes from gist.github.com (140.82.112.3): icmp_seq=1 ttl=47 time=238 ms
64 bytes from gist.github.com (140.82.112.3): icmp_seq=2 ttl=47 time=238 ms
64 bytes from gist.github.com (140.82.112.3): icmp_seq=3 ttl=47 time=246 ms
64 bytes from gist.github.com (140.82.112.3): icmp_seq=4 ttl=47 time=246 ms
--- github.com ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 5ms
rtt min/avg/max/mdev = 238.087/242.208/246.362/3.997 ms
Hosts 文件内容
127.0.0.1        localhost
# The following lines are desirable for IPv6 capable hosts
::1     localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# Generated by hosts-generator start
185.199.109.154   github.githubassets.com
140.82.113.21     central.github.com
185.199.108.133   desktop.githubusercontent.com
185.199.108.153   assets-cdn.github.com
185.199.110.133   camo.githubusercontent.com
185.199.108.133   github.map.fastly.net
146.75.93.194     github.global.ssl.fastly.net
140.82.112.3      gist.github.com
185.199.109.153   github.io
140.82.112.3      github.com
140.82.114.5      api.github.com
185.199.108.133   raw.githubusercontent.com
185.199.111.133   user-images.githubusercontent.com
185.199.110.133   favicons.githubusercontent.com
185.199.108.133   avatars5.githubusercontent.com
185.199.109.133   avatars4.githubusercontent.com
185.199.108.133   avatars3.githubusercontent.com
185.199.108.133   avatars2.githubusercontent.com
185.199.108.133   avatars1.githubusercontent.com
185.199.108.133   avatars0.githubusercontent.com
185.199.109.133   avatars.githubusercontent.com
140.82.113.9      codeload.github.com
52.216.53.9       github-cloud.s3.amazonaws.com
3.5.29.42         github-com.s3.amazonaws.com
52.217.228.57     github-production-release-asset-2e65be.s3.amazonaws.com
52.217.119.9      github-production-user-asset-6210df.s3.amazonaws.com
3.5.25.30         github-production-repository-file-5c1aeb.s3.amazonaws.com
185.199.109.153   githubstatus.com
140.82.113.18     github.community
185.199.108.133   media.githubusercontent.com
# 8/21/2024, 4:24:40 PM
#  https://github.com/fliu2476/gh-hosts.git
# Generated by hosts-generator end

希望各位能够帮助解决问题。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|一元网络论坛

GMT+8, 2024-11-17 12:45 , Processed in 0.096068 second(s), 19 queries .

Powered by Discuz! X3.4

Copyright © 2001-2020, Tencent Cloud.

快速回复 返回顶部 返回列表