gpt4 book ai didi

azure - 在 Azure 应用服务中授权 GitHub Enterprise 部署过程

转载 作者:行者123 更新时间:2023-12-02 18:12:22 24 4
gpt4 key购买 nike

在我目前的公司中,我们使用 GitHub Enterprise 作为修订控制。我使用 SAML 登录以访问我的帐户。现在我想将 GitHub 中的代码部署到我的 Azure 应用服务。所以在azure部署选项中,我选择了GitHub选项。但它说“Azure需要您的权限才能访问您的GitHub帐户”并要求我登录GitHub。但我没有 GitHub 用户名和密码,因为我们使用 SAML 访问 GitHub 帐户。您能帮我看看如何使用 Azure 授权 GitHub 帐户吗?

Azure GitHub deployment process

最佳答案

Azure 部署过程有点棘手,尝试从 Github Enterprise 进行部署,我设法让它像这样工作:

  1. In the Azure project menu, click on Properties then for the DEPLOYMENT TRIGGER URL, copy it.

  2. Go to the project settings in Github Enterprise, on the option Hooks & Services and add a new webhook, set the DEPLOYMENT TRIGGER URL on the Payload URL, leave everything else the same.

  3. Now we add the deployment process, in the Azure project menu click on Deployment Options then choose as source External Repository

  4. On your Github Account go to settings, then on the menu click on Personal Access Tokens, now generate a new token and give it the following scopes: repo and admin:pre_receive_hook then copy the token

  5. Finally, set the main branch that will activate the webhook when you push code on the repo, on the repository URL we have to set the following items:

https://<github_access_token>:x-oauth-basic@github.<enterprise>.net/<repo_name_from_root>

像这样:

https://c4207e6aae44ce086595c9abfcccb5123caf20cc:<a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="afd782c0cedadbc782cdcedcc6ccefc8c6dbc7dacd81c2d6ccc0c2dfcec1d681c1cadb" rel="noreferrer noopener nofollow">[email protected]</a>/repolocation/deployrepo

现在推送您的存储库,Webhook 将自动触发部署和构建过程。

关于azure - 在 Azure 应用服务中授权 GitHub Enterprise 部署过程,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44307289/

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