Skip to content

Do not send Hex.pm OAuth tokens to custom repositories - #1227

Merged
ericmj merged 3 commits into
mainfrom
fix-custom-repo-oauth
Aug 18, 2026
Merged

Do not send Hex.pm OAuth tokens to custom repositories#1227
ericmj merged 3 commits into
mainfrom
fix-custom-repo-oauth

Conversation

@ericmj

@ericmj ericmj commented Aug 15, 2026

Copy link
Copy Markdown
Member

Prevent Hex.pm OAuth tokens from being sent to custom repositories. Repository configurations now expose the global OAuth token only for Hex.pm sources, allowing .netrc credentials to authenticate custom repository requests while preserving per-repository authentication.

Add regression coverage for tarball downloads and public-key fetching through .netrc, plus coverage that Hex.pm install checks retain global OAuth authentication.

Fixes #1216

@ericmj
ericmj marked this pull request as ready for review August 15, 2026 14:53
@ericmj
ericmj requested a review from maennchen August 15, 2026 14:53
@maennchen

Copy link
Copy Markdown
Member

@ericmj I'm asking myself if we should rather check in hex_core if a repo is hexpm or a child repo. Otherwise do not attempt to use the token.

What do you think?

@ericmj

ericmj commented Aug 18, 2026

Copy link
Copy Markdown
Member Author

@maennchen You are right, I will make a hex_core PR and vendor that into this one.

@ericmj
ericmj merged commit 6cd6ff3 into main Aug 18, 2026
22 checks passed
@ericmj
ericmj deleted the fix-custom-repo-oauth branch August 18, 2026 19:29
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.

[Bug]: OAuth token for hex.pm is attached to custom repositories, suppressing their netrc/per-repo auth (401 on mix deps.get)

2 participants