Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: re-add support for custom registries with auth #397

Merged
merged 8 commits into from Mar 27, 2024
Merged

Conversation

aduh95
Copy link
Contributor

@aduh95 aduh95 commented Feb 25, 2024

An attempt to fix #275. We'd probably need separate env variable as suggested in the issue.

Blocked by #396.

sources/httpUtils.ts Outdated Show resolved Hide resolved
@aduh95 aduh95 changed the title test: add tests for custom registries with auth fix: re-add support for custom registries with auth Mar 17, 2024
@aduh95 aduh95 marked this pull request as ready for review March 17, 2024 15:10
@aduh95 aduh95 merged commit d267753 into main Mar 27, 2024
10 checks passed
@aduh95 aduh95 deleted the registry-test branch March 27, 2024 18:23
if (username || password) {
headers = {
...headers,
authorization: `Bearer ${Buffer.from(`${username}:${password}`).toString(`base64`)}`,
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Without testing it but I think that should be Basic instead of Bearer when using username and password. 🤔

@aduh95

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thankfully it's already fixed on main: #454

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry. Okay the fix seems not the be released yet, that might explain why it's not working. Sorry for bothering you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

401 when retrieving a package manager binary from an authenticated NPM registry
4 participants