Closed
Description
Hello
we used @v1
for our logins to AzureStack, and it worked fine until we were hit by 447 and had to migrate to @v2
. After we switched versions, the login step started failing with the below log:
Run azure/login@v2
with:
creds: ***
environment: AzureStack
enable-AzPSSession: true
allow-no-subscriptions: false
audience: api://AzureADTokenExchange
auth-type: SERVICE_PRINCIPAL
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
##[debug]Reading creds in JSON...
::add-mask::***
::add-mask::***
Running Azure CLI Login.
##[debug]Azure CLI path: /usr/bin/az
##[debug]Azure CLI version used:
##[debug]azure-cli 2.61.0
##[debug]
##[debug]core 2.61.0
##[debug]telemetry 1.1.0
##[debug]
##[debug]Extensions:
##[debug]azure-devops 1.0.1
##[debug]
##[debug]Dependencies:
##[debug]msal 1.28.0
##[debug]azure-mgmt-resource 23.1.1
##[debug]
##[debug]Python location '/opt/az/bin/python3'
##[debug]Extensions directory '/opt/az/azcliextensions'
##[debug]
##[debug]Python (Linux) 3.11.8 (main, May 16 2024, 03:47:28) [GCC 11.4.0]
##[debug]
##[debug]Legal docs and information: aka.ms/AzureCliLegal
##[debug]
##[debug]
##[debug]Your CLI is up-to-date.
##[debug]
Unregistering cloud: "azurestack" first if it exists
/usr/bin/az cloud set -n azurestack
/usr/bin/az cloud unregister -n azurestack
ERROR: The cloud 'azurestack' is not registered.
Error: Login failed with Error: The process '/usr/bin/az' failed with exit code 1. Double check if the 'auth-type' is correct. Refer to https://github.com/Azure/login#readme for more information.
##[debug]Error: The process '/usr/bin/az' failed with exit code 1
##[debug] at ExecState._setResult (/home/runner/work/_actions/azure/login/v2/lib/main/index.js:2333:25)
##[debug] at ExecState.CheckComplete (/home/runner/work/_actions/azure/login/v2/lib/main/index.js:2316:18)
##[debug] at ChildProcess.<anonymous> (/home/runner/work/_actions/azure/login/v2/lib/main/index.js:2210:27)
##[debug] at ChildProcess.emit (node:events:519:28)
##[debug] at maybeClose (node:internal/child_process:1105:16)
##[debug] at ChildProcess._handle.onexit (node:internal/child_process:305:5)
ERROR: The cloud 'azurestack' is not registered.
Ignore cloud not registered error: "Error: The process '/usr/bin/az' failed with exit code 1"
Registering cloud: "azurestack" with ARM endpoint: "https://management.<hiddenhost>.domain"
/usr/bin/az cloud register -n azurestack --endpoint-resource-manager "https://management.<hiddenhost>.domain" --suffix-keyvault-dns ".vault.<hiddenhost>.domain" --suffix-storage-endpoint "<hiddenhost>.domain" --profile "2019-03-01-hybrid"
ERROR: az cloud register: '"2019-03-01-hybrid"' is not a valid value for '--profile'. Allowed values: latest, 2017-03-09-profile, 2018-03-01-hybrid, 2019-03-01-hybrid, 2020-09-01-hybrid.
Did you mean '2019-03-01-hybrid' ?
Examples from AI knowledge base:
az cloud register -n MyCloud --cloud-config @"cloud.json" ("cloud.json" supports all the endpoint and suffix options in camel case or the JSON output format from `az cloud show`. See the example content below.) *** "endpointActiveDirectory": "https://login.microsoftonline.us", "suffixAcrLoginServerEndpoint": ".azurecr.us" *** or *** "endpoints":*** "activeDirectory": "https://login.microsoftonline.us" ***, "suffixes":*** "acrLoginServerEndpoint": ".azurecr.us" *** ***
Register a cloud with a config file
https://aka.ms/cli_ref
Read more about the command in reference docs
Error: Error while trying to register cloud "azurestack"
/home/runner/work/_actions/azure/login/v2/lib/main/index.js:2333
error = new Error(`The process '$***this.toolPath***' failed with exit code $***this.processExitCode***`);
^
Error: The process '/usr/bin/az' failed with exit code 2
at ExecState._setResult (/home/runner/work/_actions/azure/login/v2/lib/main/index.js:2333:25)
at ExecState.CheckComplete (/home/runner/work/_actions/azure/login/v2/lib/main/index.js:2316:18)
at ChildProcess.<anonymous> (/home/runner/work/_actions/azure/login/v2/lib/main/index.js:2210:27)
at ChildProcess.emit (node:events:519:28)
at maybeClose (node:internal/child_process:1105:16)
at ChildProcess._handle.onexit (node:internal/child_process:305:5)
Node.js v20.13.1
The workflow step is as follows:
- uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
environment: "AzureStack"
enable-AzPSSession: true
I am repeating myself, but the only difference with the previously working code is the @v2
tag after azure/login
Can we please get some help? Thanks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment