ARTIFACTORY: Why do I get a connection failed error when working with a Terraform smart repository?
When working with a smart Terraform repository, Artifactory may attempt to retrieve external dependencies from github.com rather than from the source Artifactory instance. If you operating in an air-gapped environment, you may encounter a 'connection failed' error due to this behavior.
When working with a smart repository, especially when working on an air-gapped environment, Artifactory should get the external dependencies from the source instance and not from github.com.
When Artifactory attempts to fetch external dependencies from GitHub instead of Artifactory, you should look for log entries like the following in the artifactory-service.log:
2023-07-10T14:35:46.969Z [jfrt ] [INFO ] [7fc48be305816603] [o.a.r.HttpRepo:453 ] [http-nio-8081-exec-3] - dev-terraform-remote downloading https://github.com/jfrog/terraform-provider-artifactory/releases/download/v6.16.0/terraform-provider-artifactory_6.16.0_darwin_amd64.zip 6.12 MB
This behavior is a known issue documented in our Jira system, and the solution is to upgrade your Artifactory instance to at version 7.63.12 or above.