从 GitHub 到 Azure 的部署失败:"Request failed with status code: 401"

Failed deployments from GitHub to Azure: "Request failed with status code: 401"

我在 Azure 上设置了一个网站,该网站自动部署来自 GitHub 的更改。这工作了一段时间,但现在我所有的部署都失败了。如果我查看日志,它只会显示:

Fetching Changes: Request failed with status code: 401

我最近将存储库从 public 更改为私有。这是我能想到的唯一会引起问题的事情。但是我在 GitHub 上用我的 username/password 重置了我的部署凭据以确保。

知道是什么导致了这个错误吗?

将 CD(持续部署)link 从您的 Web 应用程序断开到 GitHub 并重新创建它:

您看到的错误是需要 401 授权。这是由于将您的存储库从 public 更改为私有,从而使所有 OAuth 令牌和授权无效。更改回购类型可能看起来很小,但却是实质性的更改,这会使所有授权无效。

您的 Azure Web App 部署凭据与您的 GitHub 集成无关。

从 Azure Web App 到版本控制系统(即 GitHub、VSO、BitBucket、CodePlex 等)的所有源代码控制集成都通过 OAuth。