目前,我们已经设置了管道的CI部分,以便将新的git更改拉入工作区,但是我们需要手动更新更改。 我试图使用Fabric API更新GIT更改,但这仅用于用户身份验证,而不是服务主体。这是一个问题,因为我们正在通过Azure Release Pipeline中的PowerShell脚本实现解决方案。 我在其他地方看到的,可能有一种方法可以使用Microsoft Entra代币来验证请求,但我不太确定。
任何帮助将不胜感激。
您可以在没有交互提示的情况下通过凭据登录用户帐户。请确保您的帐户不启用MFA(多因素身份验证)。
$User = "[email protected]"
$PassWord = ConvertTo-SecureString -String "<Password>" -AsPlainText -Force
$tenant = "<tenant id>"
$subscription = "<subscription id>"
$Credential = New-Object -TypeName "System.Management.Automation.PSCredential" -ArgumentList $User,$PassWord
Connect-AzAccount -Credential $Credential -Tenant $tenant -Subscription $subscription
有关更多详细信息,您可以参考此
Sothread
。