Failed to Connect to api.github.com from China

We are using github api in China, and always connect failed, after analyse we found that DNS points the domain to IP:13.250.168.23 which can not be connected from China. Any idea to solve this problem or get around, thanks.

Hi @archeryuan! :wave: Welcome to the Community!

I’m afraid there’s not much we can do about our IPs being blocked for you, sorry!

We have this help article about which IP addresses and ports currently need to be accessed:

https://docs.github.com/en/github/authenticating-to-github/about-githubs-ip-addresses

Right now, this is the output of the meta API endpoint:

{
β€œverifiable_password_authentication”: true,
β€œssh_key_fingerprints”: {
β€œMD5_RSA”: β€œ16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48”,
β€œMD5_DSA”: β€œad:1c:08:a4:40:e3:6f:9c:f5:66:26:5d:4b:33:5d:8c”,
β€œSHA256_RSA”: β€œnThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8”,
β€œSHA256_DSA”: β€œbr9IjFspm1vxR3iA35FWE+4VTyz1hYVLIE2t1/CeyWQ”
},
β€œhooks”: [
β€œ192.30.252.0/22”,
β€œ185.199.108.0/22”,
β€œ140.82.112.0/20”
],
β€œweb”: [
β€œ192.30.252.0/22”,
β€œ185.199.108.0/22”,
β€œ140.82.112.0/20”,
β€œ13.114.40.48/32”,
β€œ52.192.72.89/32”,
β€œ52.69.186.44/32”,
β€œ15.164.81.167/32”,
β€œ52.78.231.108/32”,
β€œ13.234.176.102/32”,
β€œ13.234.210.38/32”,
β€œ13.229.188.59/32”,
β€œ13.250.177.223/32”,
β€œ52.74.223.119/32”,
β€œ13.236.229.21/32”,
β€œ13.237.44.5/32”,
β€œ52.64.108.95/32”,
β€œ18.228.52.138/32”,
β€œ18.228.67.229/32”,
β€œ18.231.5.6/32”
],
β€œapi”: [
β€œ192.30.252.0/22”,
β€œ185.199.108.0/22”,
β€œ140.82.112.0/20”,
β€œ13.230.158.120/32”,
β€œ18.179.245.253/32”,
β€œ52.69.239.207/32”,
β€œ13.209.163.61/32”,
β€œ54.180.75.25/32”,
β€œ13.233.76.15/32”,
β€œ13.234.168.60/32”,
β€œ13.250.168.23/32”,
β€œ13.250.94.254/32”,
β€œ54.169.195.247/32”,
β€œ13.236.14.80/32”,
β€œ13.238.54.232/32”,
β€œ52.63.231.178/32”,
β€œ18.229.199.252/32”,
β€œ54.207.47.76/32”
],
β€œgit”: [
β€œ192.30.252.0/22”,
β€œ185.199.108.0/22”,
β€œ140.82.112.0/20”,
β€œ13.114.40.48/32”,
β€œ52.192.72.89/32”,
β€œ52.69.186.44/32”,
β€œ15.164.81.167/32”,
β€œ52.78.231.108/32”,
β€œ13.234.176.102/32”,
β€œ13.234.210.38/32”,
β€œ13.229.188.59/32”,
β€œ13.250.177.223/32”,
β€œ52.74.223.119/32”,
β€œ13.236.229.21/32”,
β€œ13.237.44.5/32”,
β€œ52.64.108.95/32”,
β€œ18.228.52.138/32”,
β€œ18.228.67.229/32”,
β€œ18.231.5.6/32”,
β€œ18.181.13.223/32”,
β€œ54.238.117.237/32”,
β€œ54.168.17.15/32”,
β€œ3.34.26.58/32”,
β€œ13.125.114.27/32”,
β€œ3.7.2.84/32”,
β€œ3.6.106.81/32”,
β€œ18.140.96.234/32”,
β€œ18.141.90.153/32”,
β€œ18.138.202.180/32”,
β€œ52.63.152.235/32”,
β€œ3.105.147.174/32”,
β€œ3.106.158.203/32”,
β€œ54.233.131.104/32”,
β€œ18.231.104.233/32”,
β€œ18.228.167.86/32”
],
β€œpages”: [
β€œ192.30.252.153/32”,
β€œ192.30.252.154/32”,
β€œ185.199.108.153/32”,
β€œ185.199.109.153/32”,
β€œ185.199.110.153/32”,
β€œ185.199.111.153/32”
],
β€œimporter”: [
β€œ192.30.252.0/22”,
β€œ185.199.108.0/22”,
β€œ140.82.112.0/20”
]
}

Those IP addresses are likely to change over time, though, so you’ll need to find a way to access the meta API endpoint.

Sorry I can’t help any more! Have you looked into VPNs or that kind of thing?

1 Like

Just to verify. My team in China ( Zhuhai) get 404 when attempting to accept inventions to repositories I set up here in the US. Sorry about this guys.