use*_*099 5 git bitbucket bitbucket-pipelines
我有一个运行良好的bitbucket管道,但是现在在一个项目中,我需要从一个私有存储库中拉取,其中包含composer.json中所需的软件包。
当我在管道中安装作曲家时,此错误停止
Failed to execute git clone --no-checkout 'git@bitbucket.org:company/package.git' [...]
Cloning into '/opt/atlassian/pipelines/agent/build/vendor/company/package'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Run Code Online (Sandbox Code Playgroud)
管道没有定义任何SSH密钥,因此不允许将其拉出,但是由于它是短暂的,我该如何定义呢?
或者,也许我应该定义需求?
.ssh目录。这应该足以让它运行。
此外,我刚刚看到现在(也许这是新的,但我不确定)一个新页面“设置”>“管道”>“SSH 密钥”,用于管理管道 SSH 密钥。这样,您甚至不需要将私钥添加到您正在使用的 docker 映像中。但到目前为止我还没有使用过,所以我不能说什么。