Problem
When attempting to ingress Terraform modules via Git over SSH a Host key verification failed.
fatal: Could not read from remote repository.
is displayed and the run fails.
Cause
This is a permissions issue with the SSH host key.
Solution
There are multiple causes and solutions for this issue.
-
Ensure there is no passphrase set for the SSH key.
-
Attempt to
git clone
the repository via SSH with the same key that Terraform Enterprise is using. -
Ensure that the correct SSH key is attached to the correct Terraform Enterprise workspace. If there is no SSH key selected for the workspace then Terraform Enterprise will not save the SSH host key.
-
Verify that the SSH key configured on the workspace synchronizes with the SSH host key.
-
If you are using Single Sign-On (SSO), ensure that the SSH key has been configured for SSO operations on the VCS provider site.