Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request]: Add GitHub's SSH key fingerprints #20

Open
2 tasks done
rswrz opened this issue Dec 20, 2024 · 0 comments
Open
2 tasks done

[Feature Request]: Add GitHub's SSH key fingerprints #20

rswrz opened this issue Dec 20, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@rswrz
Copy link
Member

rswrz commented Dec 20, 2024

Feature Description

At one customer site, we install Terraform modules from private Git repositories using SSH. This requires the Git server’s SSH fingerprints to be present in the known_hosts file. Without this, Terraform fails to install the module via SSH, displaying the following error message:

╷
│ Error: Failed to download module
│ 
│   on main.tf line 1337:
│   1337: module "example" {
│ 
│ Could not download module "example" (main.tf:1337) source code
│ from "git::ssh://[email protected]/cloudeteer/private-repository.git?ref=v1.1.1":
│ error downloading
│ 'ssh://[email protected]/cloudeteer/private-repository.git?ref=v1.1.1': /usr/bin/git
│ exited with 128: Cloning into '.terraform/modules/example'...
│ Host key verification failed.
│ fatal: Could not read from remote repository.
│ 
│ Please make sure you have the correct access rights
│ and the repository exists.
│ 
╵

Use Case

Enable the installation of Terraform modules via SSH during the terraform init execution, without the need to manually add SSH server fingerprints as a GitHub Actions step.

Additional Information

On the customer’s custom Launchpad installation, this is currently achieved by the following command in the install script.

# Add GitHub SSH host keys to known hosts
sudo -u "$RUNNER_USER" -- ssh-keyscan -t rsa github.com | sudo -u "$RUNNER_USER" -- tee -a "/home/$RUNNER_USER/.ssh/known_hosts"

Privacy Statement

  • I agree

Code of Conduct

  • I agree to follow this repository's Code of Conduct
@rswrz rswrz added enhancement New feature or request good first issue Good for newcomers labels Dec 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant