当我推送到我的测试品牌时,我正在尝试使用Bitbucket Pipelines进行以下操作:
- git fetch
- git checkout master
- git pull origin test
- git push origin master
但我在git fetch上得到以下消息:Permission denied(publickey) . 我正在按照本教程https://confluence.atlassian.com/bitbucket/use-ssh-keys-in-bitbucket-pipelines-847452940.html所以我已经添加了一个ssh密钥,但是无法理解执行所需的后续步骤有权连接到存储库 .
2 回答
如果“来自同一存储库”实际上意味着您想要访问管道运行的存储库,答案是:您不需要它 . 管道运行时,它会启动您在YAML配置中定义的Docker镜像,并自动检出您推送的提交 . 这意味着在执行命令(
git fetch
)时,源已经在路径/project
中等待您 .BitBucket Pipelines在运行时自动检出存储库 . 但是,如果要对存储库进行更改(例如
git tag
或git push
),则需要根据已找到的帖子添加SSH密钥(https://confluence.atlassian.com/bitbucket/use-ssh-keys-in-bitbucket-pipelines-847452940.html) . 这适用于我们的环境 .你可以发布完整的
bitbucket-pipelines.yml
文件吗?