gpt4 book ai didi

git - Bitbucket 管道 - 使用 SSH key pull/推代码而没有权限被拒绝

转载 作者:行者123 更新时间:2023-12-04 08:14:39 25 4
gpt4 key购买 nike

我对 Bitbucket Pipeline 很感兴趣,并且正在努力解决它。
如果你们有任何想法,请告诉我。我真的很感激。
下面是场景:

  • 我有 2 个存储库:库和包。库包含源代码,包包含可在许多项目中重用的特定代码。
  • Bitbucket Pipeline 为 Library 和 Package repo 启用。
  • 我在 Library repo 中编写代码,构建并将最终代码推送到 Package repo。因此,Library 和 Package repos 需要使用 Bitbucket Pipeline 进行通信。

  • 以下是我的问题:
  • 如何在 Bitbucket Pipeline 中使用 SSH key 将代码从库存储库 pull/推到包存储库而没有被拒绝的权限?
  • 根据此链接:the third comment from Maze Hawks , 将 SSH key 添加到个人设置允许这样做,但是我们是否有任何替代方法,因此我们不必将 SSH key 添加到个人设置?

  • 感谢您阅读我的问题。

    最佳答案

    but do we have any alternative ways so we don't have to add the SSH Key to Personal Setting?


    不使用 SSH:您需要拥有与您的帐户关联的正确公钥(假设您的帐户拥有包存储库,这意味着首先有权推送到它)
    或者,您需要让 BitBucket 管道回推 using alternative authentication methods ,使用 HTTPS URL 和 OAuth。 (设置 > OAuth 消费者 > 添加消费者。)

    关于git - Bitbucket 管道 - 使用 SSH key pull/推代码而没有权限被拒绝,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65768398/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com