Skip to content

[BUG] CDN download doesn't use provided HTTP Authorization token (even if it's provided hardcoded in the URL) #331

@baybal

Description

@baybal

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

Authorization token is not passed to downloader, nor from the credential storage, nor from URL directly

$ npm i -S git+https://oauth2:ghp_************@github.com/************/private_repo.git

npm http fetch GET 404 https://codeload.github.com/me/private_repo/tar.gz/hash 1294ms (cache skip)

Expected Behavior

Auth passed to downloader from credential storage

npm http fetch GET 200 https://codeload.github.com/me/private_repo/tar.gz/hash 1294ms (cache skip)

Steps To Reproduce

  1. Create a private repo on GitHub
  2. Create read only GitHub token
  3. $ npm i -S git+https://oauth2:ghp_************@github.com/************/************.git
  4. See it missing cache, and reverting to git+ssh

Environment

  • npm:9.8.1
  • Node:v20.6.1
  • OS:Linux
  • platform:Dell XPS 13

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixingNeeds Triageneeds an initial review

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions