Skip to content

[BUG] apm install fails without GitLab token, but adding it directly to apm.yml succeeds #1501

@sjoerdvanBommel

Description

@sjoerdvanBommel

Describe the bug
Running apm install git@gitlab.com:<subpath>/.../<repo>.git#<tag> fails if there's no GitLab token available in env variables, and no git credential helper is set up.

Authentication failed for gitlab.com
Authentication failed for validate on gitlab.com.
No token available.
Set GITLAB_APM_PAT or GITLAB_TOKEN, or configure git 
credential fill for gitlab.com.
Run with --verbose for detailed auth diagnostics.
[!] Install interrupted after 0.8s.

But if I add the exact same path in apm.yml dependencies.apm array and run apm install, it works fine. It then uses my SSH key.

Occurs in GitLab SaaS for private repositories. Have not tested this with other git hosts nor public repositories.

To Reproduce
Steps to reproduce the behavior:

  1. Run command 'apm install git@gitlab.com:subpath/.../repo.git#tag' (private repo)
  2. See error similar to above.

Expected behavior
Same behavior as when adding it manually to the dependencies in apm.yml.

Environment (please complete the following information):

  • OS: macOS
  • Python Version: 3.12.11
  • APM Version: 0.14.2
  • VSCode Version: 1.121.0

Metadata

Metadata

Assignees

Labels

type/bugSomething does not work as documented.

Type

No type
No fields configured for issues without a type.

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions