博客
关于我
解决github图片不显示问题_2020/06/25更新
阅读量:212 次
发布时间:2019-02-28

本文共 1527 字,大约阅读时间需要 5 分钟。

 最近在课设,想这参考参考网上开源的项目,结果发现 GitHub上的大部分项目的示例图片一个个都图裂,无法显示。网上搜索有人说原因是域名污染,咱也不知道是什么情况,反正照着下面的解决方法搞定就行。

解决方法:
 打开 C:\Windows\System32\drivers\etc 下的 hosts 文件,直接用记事本打开就行。
在这里插入图片描述
在这里插入图片描述
 搜索GitHub
在这里插入图片描述
 将下列地址复制到hosts文件中,保存在进入GitHub查看图片即可

# GitHub151.101.184.133    assets-cdn.github.com151.101.184.133    raw.githubusercontent.com151.101.184.133    gist.githubusercontent.com151.101.184.133    cloud.githubusercontent.com151.101.184.133    camo.githubusercontent.com151.101.184.133    avatars0.githubusercontent.com199.232.68.133     avatars0.githubusercontent.com199.232.28.133     avatars1.githubusercontent.com151.101.184.133    avatars1.githubusercontent.com151.101.184.133    avatars2.githubusercontent.com199.232.28.133     avatars2.githubusercontent.com151.101.184.133    avatars3.githubusercontent.com199.232.68.133     avatars3.githubusercontent.com151.101.184.133    avatars4.githubusercontent.com199.232.68.133     avatars4.githubusercontent.com151.101.184.133    avatars5.githubusercontent.com199.232.68.133     avatars5.githubusercontent.com151.101.184.133    avatars6.githubusercontent.com199.232.68.133     avatars6.githubusercontent.com151.101.184.133    avatars7.githubusercontent.com199.232.68.133     avatars7.githubusercontent.com151.101.184.133    avatars8.githubusercontent.com199.232.68.133     avatars8.githubusercontent.com # GitHub End

效果图:

在这里插入图片描述

 这个地址是有时效性的,可能过一段时间又不可以了,所以大家可以在网上搜搜有没有最新的地址,进行替换即可。

 另外,复制这些地址可能会引起打不开GitHub的情况,如果打不开就把复制的地址去掉即可,当然这样又不能显示图片了,但是把地址复制到hosts中可以维持GitHub正常运行和显示图片一段短暂的时间,虽然有些麻烦,但确实可行,估计也有可能是网络问题,期待真正的解决方案。
在这里插入图片描述

转载地址:http://imoi.baihongyu.com/

你可能感兴趣的文章
Mysql:mysql 5.X 报错 ERROR 1193 (HY000): Unknown system variable ‘validate_password_length‘
查看>>
MySQL:MySQL执行一条SQL查询语句的执行过程
查看>>
Mysql:SQL性能分析
查看>>
mysql:SQL按时间查询方法总结
查看>>
MySQL:什么样的字段适合加索引?什么样的字段不适合加索引
查看>>
MySQL:判断逗号分隔的字符串中是否包含某个字符串
查看>>
MySQL:某个ip连接mysql失败次数过多,导致ip锁定
查看>>
Mysql:避免重复的插入数据方法汇总
查看>>
m_Orchestrate learning system---二十二、html代码如何变的容易
查看>>
n = 3 , while n , continue
查看>>
n 叉树后序遍历转换为链表问题的深入探讨
查看>>
N-Gram的基本原理
查看>>
nacos config
查看>>
Nacos 与 Eureka、Zookeeper 和 Consul 等其他注册中心的区别
查看>>
Nacos2.X 配置中心源码分析:客户端如何拉取配置、服务端配置发布客户端监听机制
查看>>
NacosClient客户端搭建,微服务注册进nacos
查看>>
Nacos做注册中心使用
查看>>
Nacos原理
查看>>
Nacos发布0.5.0版本,轻松玩转动态 DNS 服务
查看>>
Nacos启动异常
查看>>