gpt4 book ai didi

azure-keyvault - 尝试将自定义角色 "Secret Reader"分配给 Azure Key Vault 的对象 ID 时出错

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

谁能告诉我为什么在尝试运行此命令并将自定义角色“Secret Reader”分配给 guest 帐户对象 ID 时出现此错误:

az role assignment create --role "Secret Reader"--assignee-object-id "12526c57-c91b-405b-9068-2b582b23e83a"--scope "/subscriptions/Not-putting this-here/resourceGroups/pallabdev/providers/Microsoft.KeyVault/vaults/testhalvault”

我得到的错误是:

request failed: Error occurred in request., InvalidSchema: No connection adapters were found for 'C:/Program Files/Git/subscriptions/Not-Putting-This-Here/resourceGroups/pallabdev/providers/Microsoft.KeyVault/vaults/testhalvault/providers/Microsoft.Authorization/roleDefinitions?$filter=roleName%20eq%20%27Secret%20Reader%27&api-version=2018-01-01-preview'

最佳答案

从错误消息来看,我想你是在 Windows 的 Git Bash 中运行的命令,我也可以在我这边重现它,这是由 Auto-translation of Resource IDs 引起的在 Git Bash 中,类似问题 here .

要解决此问题,只需设置环境变量 MSYS_NO_PATHCONV=1 或在运行命令时临时设置即可。

$ MSYS_NO_PATHCONV=1 az role assignment create --role "Secret Reader" --assignee-object-id "12526c57-c91b-405b-9068-2b582b23e83a" --scope "/subscriptions/Not-putting this-here/resourceGroups/pallabdev/providers/Microsoft.KeyVault/vaults/testhalvault"

enter image description here

关于azure-keyvault - 尝试将自定义角色 "Secret Reader"分配给 Azure Key Vault 的对象 ID 时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66835138/

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