fatal: unable to access ‘https://github.com/ohmyzsh/ohmyzsh.git/‘:

今天发现ohmyzsh更新失败了,我特地找了一下原因,下面是更新失败的日志:

[oh-my-zsh] Would you like to update? [Y/n] Y
Updating Oh My Zsh
fatal: unable to access 'https://github.com/ohmyzsh/ohmyzsh.git/': Failed to connect to github.com port 443: Operation timed out
There was an error updating. Try again later?

后面排查发现,原来是hosts里面配置了github的dns:

52.74.223.119     github.com
52.74.223.119   gist.github.com
54.169.195.247   api.github.com
185.199.111.153   assets-cdn.github.com
199.232.96.133    raw.githubusercontent.com
199.232.96.133    gist.githubusercontent.com
199.232.96.133    cloud.githubusercontent.com
199.232.96.133   camo.githubusercontent.com
199.232.96.133   avatars0.githubusercontent.com
199.232.96.133    avatars1.githubusercontent.com
199.232.96.133   avatars2.githubusercontent.com
199.232.96.133    avatars3.githubusercontent.com
199.232.96.133    avatars4.githubusercontent.com
199.232.96.133    avatars5.githubusercontent.com
199.232.96.133    avatars6.githubusercontent.com
199.232.96.133    avatars7.githubusercontent.com
199.232.96.133    avatars8.githubusercontent.com
199.232.96.133  user-images.githubusercontent.com
185.199.109.154   github.githubassets.com

貌似这些关于github的失效了,于是我把hosts里面关于github的部分全部删除了:

sudo vim /etc/hosts
按dd键可以删除
wq保存推出

然后手动更新:

cd ~/.oh-my-zsh
upgrade_oh_my_zsh

一下子就更新成功了哈:

Note: `upgrade_oh_my_zsh` is deprecated. Use `omz update` instead.
Updating Oh My Zsh
remote: Enumerating objects: 168, done.
remote: Counting objects: 100% (168/168), done.
remote: Compressing objects: 100% (51/51), done.
remote: Total 118 (delta 78), reused 104 (delta 65), pack-reused 0
Receiving objects: 100% (118/118), 32.61 KiB | 184.00 KiB/s, done.
Resolving deltas: 100% (78/78), completed with 39 local objects.
From https://github.com/ohmyzsh/ohmyzsh
 * branch            master     -> FETCH_HEAD
   f21e646..69507c9  master     -> origin/master
   ....

参考文献

oh-my-zsh 更新

ohmyzsh更新失败的解决

  • 10
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 3
    评论
回答: "unable to access 'https://github.com/fmtlib/fmt.git/'"的错误提示表明在访问该GitHub仓库时出现了连接问题。根据引用\[1\]、\[2\]和\[3\]的信息,这种错误可能是由于SSL连接问题引起的。具体来说,可能是由于OpenSSL SSL_read错误、gnutls_handshake失败或OpenSSL SSL_read错误导致的连接问题。这些错误可能是由于网络连接不稳定、服务器问题或其他网络配置问题引起的。为了解决这个问题,你可以尝试以下几个步骤: 1. 检查你的网络连接是否正常。确保你的网络连接稳定,并且没有任何阻止访问GitHub的网络设置或防火墙。 2. 尝试使用其他网络或设备进行访问。有时候,特定的网络或设备可能会导致连接问题。尝试使用其他网络或设备来确认问题是否与特定的网络或设备有关。 3. 检查GitHub服务器状态。有时候,GitHub服务器可能会出现问题,导致无法访问。你可以在GitHub的状态页面上查看服务器的状态,确认是否有任何已知的问题。 4. 尝试使用其他访问方式。如果你仍然无法访问该仓库,你可以尝试使用其他访问方式,例如使用SSH协议进行访问,或者使用其他Git托管服务。 总结来说,"unable to access 'https://github.com/fmtlib/fmt.git/'"的错误提示表明在访问该GitHub仓库时出现了连接问题。你可以尝试检查网络连接、尝试其他网络或设备、检查GitHub服务器状态以及尝试其他访问方式来解决这个问题。 #### 引用[.reference_title] - *1* [解决unable to access ‘xxx.git/‘: OpenSSL SSL_](https://blog.csdn.net/a1137608040/article/details/120550854)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [git clone 报错:fatal: unable to accesshttps://github.com/xxxxxxxxx/xxx.git/‘: gnutls_](https://blog.csdn.net/weixin_45647721/article/details/123912786)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [Git报错解决:fatal: unable to accesshttps://github.com/.......‘: OpenSSL SSL_read: Connection ...](https://blog.csdn.net/m0_65005402/article/details/125403150)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control_2,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

农民小飞侠

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值