Fail to download external CMake project while building

My cmake project has external projects. Snapcraft can build this on my PC. But it fails on build.snapcraft.io with “Could not resolve host” errors. It seems that snapcraft can not download cmake external projects. Any help?

My snapcraft.yaml is