You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On these OneBranch compliant CI/CD pipelines we must use a private internal authenticated npm registry. Autorest fails tiring to acquire autorest-core's version during bootstrapping. Autorest should support this as a typical use-case and use .npmrc on private authenticated npm registries.
Can this be done, if not there is no way to have the required network isolation and a private npm reg that requires authentication.
NOTE: The setting of the env autorest_registry: https://msdata.pkgs.visualstudio.com/................../npm/registry/
- script: >- autorest --input-file=.some-spec.json --csharp --namespace=SOME-NAMESPACE --legacy --debug env: # Variables to map into the process's environment. autorest_registry: https://msdata.pkgs.visualstudio.com/................../npm/registry/
Failure on getting azure-core version
"C:\Windows\system32\cmd.exe" /D /E:ON /V:OFF /S /C "CALL "C:\__w\_temp\548d9984-5f23-47b4-8d71-afa9773675f2.cmd""
AutoRest code generation utility [cli version: 3.7.1; node: v20.11.1]
(C) 2018 Microsoft Corporation.
https://aka.ms/autorest
info | AutoRest core version selected from configuration: ~2.0.4413.
debug | [0.97 s] Network Enabled: true
debug | [1.13 s] No @autorest/core (or @microsoft.azure/autorest-core) is installed.
debug | [1.13 s] ~2.0.4413 was not satisfied directly by a previous installation.
debug | [1.39 s] Error trying to resolve @autorest/core version ~2.0.4413: Error: Unable to resolve package '@autorest/core@~2.0.4413'.
Failure:
Error: Unable to find a valid AutoRest core package '@autorest/core' @ '~2.0.4413'.
Error: Unable to find a valid AutoRest core package '@autorest/core' @ '~2.0.4413'.
at selectVersion (C:\__t\node\20.11.1\x64\node_modules\autorest\dist\src_autorest-as-a-service_ts.js:393:23)
at resolveCoreVersion (C:\__t\node\20.11.1\x64\node_modules\autorest\dist\src_autorest-as-a-service_ts.js:590:29)
at main (C:\__t\node\20.11.1\x64\node_modules\autorest\dist\app.js:98:33)
Additional context
I think what is happening is after setting the env autorest_registry autorest'ss use of pacote manifest fetch to get the azure-core version fails since it can not properly authenticate:
There is no way to deal with the _auth scopes from .npmrc and pacote.manifest. This is my speculation anyhow since this is difficult to debug this in CI pipelines.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
On these OneBranch compliant CI/CD pipelines we must use a private internal authenticated npm registry. Autorest fails tiring to acquire autorest-core's version during bootstrapping. Autorest should support this as a typical use-case and use
.npmrc
on private authenticated npm registries.Can this be done, if not there is no way to have the required network isolation and a private npm reg that requires authentication.
Here are the pipeline steps:
network isolation
Npm Authenticate via ADO
.npmrc
Set env and run autorest
Failure on getting azure-core version
Additional context
I think what is happening is after setting the env
autorest_registry
autorest'ss use ofpacote
manifest fetch to get the azure-core version fails since it can not properly authenticate:There is no way to deal with the _auth scopes from .npmrc and
pacote.manifest
. This is my speculation anyhow since this is difficult to debug this in CI pipelines.Beta Was this translation helpful? Give feedback.
All reactions