首页 > 解决方案 > Cloud Builder 无法通过 ssh 与 Git 连接

问题描述

我生成了 ssh 密钥并按照手册中的方式添加(https://cloud.google.com/cloud-build/docs/access-private-github-repos#create_or_update_known_hosts_file)但是当构建器使用git submodule update --init --recursive我得到的命令时:

Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.

当我在本地使用相同的 ssh 密钥时,我在克隆 repos 等方面没有任何问题。

标签: google-cloud-platformgoogle-cloud-build

解决方案


推荐阅读