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

网友投稿 3680 2022-08-23

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

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

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

[oh-my-zsh] Would you like to update? [Y/n] YUpdating Oh My Zshfatal: unable to access 'Failed to connect to github.com port 443: Operation timed outThere was an error updating. Try again later?

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

52.74.223.119 github.com52.74.223.119 gist.github.com54.169.195.247 api.github.com185.199.111.153 assets-cdn.github.com199.232.96.133 raw.githubusercontent.com199.232.96.133 gist.githubusercontent.com199.232.96.133 cloud.githubusercontent.com199.232.96.133 camo.githubusercontent.com199.232.96.133 avatars0.githubusercontent.com199.232.96.133 avatars1.githubusercontent.com199.232.96.133 avatars2.githubusercontent.com199.232.96.133 avatars3.githubusercontent.com199.232.96.133 avatars4.githubusercontent.com199.232.96.133 avatars5.githubusercontent.com199.232.96.133 avatars6.githubusercontent.com199.232.96.133 avatars7.githubusercontent.com199.232.96.133 avatars8.githubusercontent.com199.232.96.133 user-images.githubusercontent.com185.199.109.154 github.githubassets.com

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

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

然后手动更新:

cd

一下子就更新成功了哈:

Note: `upgrade_oh_my_zsh` is deprecated. Use `omz update` instead.Updating Oh My Zshremote: 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 0Receiving objects: 100% (118/118), 32.61 KiB | 184.00 KiB/s, done.Resolving deltas: 100% (78/78), completed with 39 local objects.From * branch master -> FETCH_HEAD f21e646..69507c9 master -> origin/master ....

参考文献

​​oh-my-zsh 更新​​

​​ohmyzsh更新失败的解决​​

版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。

上一篇:[leetcode] 1518. Water Bottles
下一篇:Python 超详细的入门教程(python能做什么)
相关文章

 发表评论

暂时没有评论,来抢沙发吧~