password
URL
type
status
date
slug
summary
tags
category
icon
标签
是否汉化
centos 解决 github clone和下载相关包网络超时,慢的问题
- 在
CentOS 服务器
上通过git clone
下载项目,速度很慢或直接超时
git clone
特别慢,是因为github.global.ssl.fastly.net
域名被限制了,只要找到这个域名对应的IP
地址,然后在hosts
文件中加上ip–>域名
的映射,刷新DNS
缓存便可。
nslookup
命令获取github
IP
地址- 如果没有安装,则需要安装一下
2. 获取
IP
地址![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2F3ceca00d-625c-4045-b623-557dccbc6dd7%2FUntitled.png?table=block&id=6ee9de76-eb42-4fe8-a3d1-6160831993a0&t=6ee9de76-eb42-4fe8-a3d1-6160831993a0&width=708&cache=v2)
- 修改
hosts
文件
- 编辑
hosts
- 填入内容,保存
![notion image](https://www.notion.so/image/https%3A%2F%2Fprod-files-secure.s3.us-west-2.amazonaws.com%2F68202bb5-9faf-4bfe-9cc4-aaf29bc1fbcc%2Fe9a3e8f4-a5de-4602-afb6-846e4123faea%2FUntitled.png?table=block&id=181f7367-5af4-4b67-9301-853a517dfeb1&t=181f7367-5af4-4b67-9301-853a517dfeb1&width=708&cache=v2)
nscd
命令更新DNS
缓存
1、如果没有安装,则需要安装一下
2、更新
DNS
缓存- 然后再次执行
git clone
,则会进入下载。
离开乏味的皮囊,自由的灵魂在路上
- Name: Alan Hsu
- Tag: 随感、技术、经验、旅行、推荐、生活、音乐、电影 etc.
- Email:xulanzhong521gmail.com
- Twitter:@AlanHsu521
- Telegram:@AlanHsu521
- WeChat: Alan_Hsu_521
- Github: https://github.com/xsoway/
![notion image](https://cdn.jsdelivr.net/gh/xsoway/xmylog_imgs@main/wechat.jpeg?t=321f62a3-df0f-405f-807c-eee2643edf9a)
![notion image](https://cdn.jsdelivr.net/gh/xsoway/xmylog_imgs@main/%E5%85%AC%E4%BC%97%E5%8F%B7.jpeg?t=903481fa-2bb6-41c1-9f7f-3887b31d6069)
- Author:Alan_Hsu
- URL:https://xmylog.com/article/articles_centos_github-timeout
- Copyright:All articles in this blog, except for special statements, adopt BY-NC-SA agreement. Please indicate the source!
Relate Posts