Solve the problem Bowen pictures do not show

problem

Recently wrote Bowen, I noticed the picture does not show:

Bowen used the picture have been using github make plans bed, and she github the pictures do not show:

error: Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID
this is affecting understand Bowen content ah, found on the Internet look to find a solution to record it.
The following method with reference to the liberation of bloggers Antrn this blog: [date] to solve the problem github picture is not displayed .

Root of the problem

Bloggers john-zeng explained:

In fact, it is believed, ERR_CERT_COMMON_NAME_INVALID is to use the wrong domain name visit https resources of a node. This leads to the wrong reasons, basically:
  ① dns pollution
  ② host setting error
  ③ official update dns, dns cache but has not been updated, leading to misinterpretation.

Solving steps

The main idea is to use local hostsfiles on the site domain name resolution, the general DNS problems can be resolved by modifying the hosts file, github of CDN domain name is the problem of pollution is no exception, can also be resolved by modifying the hosts file, DNS directly to IP resolve DNS addresses to bypass, in order to solve the pollution problem.

Find URL

Open github hang with any image page, use 元素选择器(Ctrl + Shift + C) can not be displayed on the picture, or hang a picture on the right - check element, the picture of a label is positioned, then you get a its URL, called the srcproperty.
For example:

either directly in the Consolepreservation field right error log:

Open the logs available Image Link:

Copy the link:
https://raw.githubusercontent.com/Amyoyoyo/media/master/blog/dp01backpack.gif

Obtain an IP address

After obtaining the URL to open IPAddress.com this website, enter its domain name in the search box, that is, https: // com to that part, commonly known as the two domain names:
raw.githubusercontent.com

Enter to obtain the domain name and IP address information:

we can see IP They are: 199.232.4.133and is 2019.10.18 last updated, then we can make up this IP and domain name mapping.
(Other If there are other pictures of the same can not be displayed using this method one mapping can be.)

Modify hosts

Specifically how to map it? Modify the hosts file! ! ! If using a windows system administrator privileges to open the hosts file:
C:\Windows\System32\drivers\etc\hosts
add at the end of the file:

# GitHub Start
192.30.253.112    github.com
199.232.4.133    raw.githubusercontent.com
# GitHub End

PS: Also to note is that, if re-hang the picture, you only need to update the IP on the line

Guess you like

Origin www.cnblogs.com/weixia14/p/11770533.html