Skip to content

[FEATURE] improve error message for missing auth for ADO repo #625

@markheath

Description

@markheath

When installing packages from an Azure DevOps repo without an Azure DevOps PAT configured, apm install fails with a generic “Failed to clone repository” error. The failure gives no indication that authentication is missing, which makes diagnosis non‑obvious for first‑time users.

Example anonymized output:

[*] Validating 1 package...
[+] dev.azure.com/<org>/<project>/<repo>/<path>#main
[*] Updated apm.yml with 1 new package(s)
[>] Installing 1 new package...

-- Diagnostics --
  [x] 1 package failed:
    +- <package-name> -- Failed to download dependency <org>/<project>/<repo>: Failed to clone
repository: C:\Users\<user>\AppData\Local\Temp\tmpxxxxxx\repo_clone

[x] Installation failed with 1 error(s).

Proposed behaviour:

APM should detect that:

  • The dependency host is dev.azure.com, and
  • No ADO_APM_PAT is configured

…and emit a more actionable error, for example:

Azure DevOps authentication required.
Set the ADO_APM_PAT environment variable with a PAT that has Code (Read) scope.

Metadata

Metadata

Assignees

No one assigned

    Labels

    acceptedDeprecated: use status/accepted. Kept for issue history; will be removed in milestone 0.10.0.enhancementDeprecated: use type/feature. Kept for issue history; will be removed in milestone 0.10.0.good first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions