我正在Golang编写一个CDK管道,CDK构建将从私有GitHub存储库导入一个包。
构建CDK项目并启动CDK synth命令的yaml文件如下所示:

错误:
internal/infrastructure/file.go:10:2: github.com/private-repository/lb@v0.0.0-20220707180825-25060de2ad6d: invalid version: git ls-remote -q origin in /go/pkg/mod/cache/vcs/82d62389c6040b63289b711060bd7a3817a57a89b79a0f50ca152ad3d073eca1: exit status 128:
351 Warning: Permanently added the RSA host key for IP address '11.11.11.11' to the list of known hosts.
352 git@github.com: Permission denied (publickey).
353 fatal: Could not read from remote repository.
354
355 Please make sure you have the correct access rights
356 and the repository exists.
357
358 Subprocess exited with error 1以上是我在管道无法从GitHub下载私有存储库时遇到的错误。
有人能帮我解释一下为什么会发生这种情况吗?我该如何解决这个问题?
发布于 2022-11-19 06:54:51
我正面临着问题,我在这里发现了什么。
new codebuild.GitHubSourceCredentials(this, 'CodeBuildGitHubCreds', {
accessToken: SecretValue.secretsManager(githubTokenSecretValueName),
});注意:
https://stackoverflow.com/questions/74000322
复制相似问题