Unable to download forge templates from forge cli

I can’t reproduce this error either (although on macOS and Linux machines). One possible problem I can see is that the host you are trying to reach has both IPv4 and IPv6 connectivity, and some Internet providers and routers don’t configure IPv6 properly.

Browsers have encountered this problem a lot and silently handle a lot of errors, so you might not notice anything wrong when opening this URL in the browser, but Node.js which Forge runs on doesn’t do it by default (yet).

Can you please try the following:

  • Run your script with node --dns-result-order=ipv4first script.js and see if it improves the reliability.
  • Disable IPv6 in system settings and see if this makes the script run reliably.
  • Look at the captured Wireshark packets to see which IP version are successful and failing ones using.