从 Azure webapp 中删除部署凭据

Remove deployment credentials from Azure webapp

我创建了一个 azure webapp。 对于本地 git 部署,我创建了一些部署凭据。

我后来删除了webapp,并创建了一个新的。很高兴我可以使用与以前相同的应用程序名称。 (我不想永久污染应用命名空间。)

我想使用相同的部署凭据,但 Azure 不允许 - 我不得不稍作更改。

  1. 有没有办法删除那些旧凭据?
  2. 当系统意识到它们不再可用时,凭据是否会在一段时间后消失?
  3. 凭据在哪个命名空间中?它们是全局唯一的,还是我的帐户、订阅或资源组唯一的?

您所指的是用户级别部署凭据。这些与您的帐户相关联。

请参阅本文以了解用户级凭据的工作原理:User-level credentials (aka Deployment Credentials)

上面的片段link

These are the credentials that you choose yourself in the Azure portal. If you're not sure what they are, you can reset them by going to the Dashboard tab for any site and clicking 'Reset deployment credentials' (under quick glance).

These credentials are directly tied to a Microsoft Account, and not to a particular web app. This needs to be emphasized, because the Azure portal UI is a bit confusing, as you need to go under a specific site on order to change them. But changing them under one site affects all of them!

Note that when an Azure subscription has multiple admins/co-admins, each person has their own set of credentials, since they each have a different Microsoft Account. The same is true for users that are given access to a Web App via RBAC (Role Based Access Control). In other words, user-level credentials are never meant to be shared among different users.

One key point about the user-level credentials is that since you specifically set them, they are meant to be memorized, and directly typed by the user when needed (e.g. when doing a git push).

UI 的限制是没有 reset/retrieve 密码选项。如果您尝试使用现有用户名执行任何操作(在 Azure 中全局检查),您将收到如下所示的错误:

只有当您输入之前未使用过的名称时,UI 才会允许您继续。

回答您的问题。当您设置不同的部署凭据时,部署凭据将被删除。因此,如果您忘记了旧部署凭据的密码,则可以将用户名更改为唯一的用户名,然后再次恢复为旧用户名。

但是,如果其他人选择或已经选择了您的用户名,那么您将无法拥有它。

因此凭据与您的帐户相关联,但它们在全球范围内可用。

要删除用户范围部署凭据而不创建新凭据,我使用 Azure Resource Explorer 按照此页面上的步骤操作:https://www.thebestcsharpprogrammerintheworld.com/2018/04/17/how-to-delete-your-azure-app-service-deployment-credential/