执行terraform plan遇Host key verification failed错误(GitHub SSO)求助
Terraform执行
plan时拉取模块报错Host key verification failed 执行terraform plan时出现如下错误:
╷ │ Error: Failed to download module │ │ Could not download module "foo" (main.tf:123) source code from │ "git@github.com:my-company/some-repo": error downloading │ 'ssh://git@github.com/my-company/some-repo': /usr/bin/git exited with 128: │ Cloning into '.terraform/modules/foo' │ Host key verification failed. │ fatal: Could not read from remote repository. │ │ Please make sure you have the correct access rights │ and the repository exists.
已完成的排查操作:
- 本地SSH密钥已通过
ssh-add -l确认加载 - 直接执行
git clone ssh://git@github.com/my-company/some-repo可成功克隆目标仓库 - 该仓库属于公司GitHub组织,需通过GitHub SSO认证访问
- 已查阅HashiCorp官方文档中的对应解决方案,完成所有建议操作后问题仍未解决
有没有人知道这个问题的解决办法?
内容的提问来源于stack exchange,提问作者Dommondke
相关产品推荐
相关产品推荐

