gpt4 book ai didi

bash - 使用 .publishsettings 文件登录 Azure

转载 作者:行者123 更新时间:2023-12-02 06:49:37 25 4
gpt4 key购买 nike

我正在尝试使用 CLI 工具将保留 IP 分配给虚拟机。运行$后:azure网络网卡设置[

pawel@LAMP-Test:~$ azure network nic set LAMP-Test FirstReservedIP
info: Executing command network nic set
error: The current cmdlet requires you to log in using Azure Active Directory account, not from a .publishsettings file. Please run 'azure login' or use 'azure account set' to select a correct subscription.
info: Error information has been recorded to /home/pawel/.azure/azure.err
error: network nic set command failed

info:    Executing command network nic set
error: The current cmdlet requires you to log in using Azure Active Directory account, not from a .publishsettings file. Please run 'azure login' or use 'azure account set' to select a correct subscription.
info: Error information has been recorded to /home/pawel/.azure/azure.err
error: network nic set command failed
 azure network nic set LAMP-Test FirstReservedIP

] 1第一个保留IP

我收到以下错误:

The current cmdlet requires you to log in using Azure Active Directory account, not from a .publishsettings file. Please run 'azure login' or use 'azure account set' to select a correct subscription.

有没有办法仅使用 .publishsettings 文件来完成此任务?

最佳答案

不,至少当您处于 ARM 模式时不会。仅在 ASM 模式下支持使用 .publishsettings 文件从 CLI 工具进行身份验证。

提供更多信息 here .

您仍然可以使用 CLI 实现非交互式登录,但需要使用工作/学校帐户(也称为组织帐户)向 Azure AD 进行身份验证。因此,如果您还没有管理员用户(或服务主体),请在 Azure AD 中创建一个。然后,将 azure login 命令添加到 CLI 脚本的顶部。例如...

azure login --username <a href="https://stackoverflow.com/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="4f252027212b202a0f2c20213b203c2061202122262c3d203c20293b612c2022" rel="noreferrer noopener nofollow">[email protected]</a> --password passw0rD!
azure network nic set LAMP-Test FirstReservedIP

关于bash - 使用 .publishsettings 文件登录 Azure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37322696/

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