GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Feat/private registry by dohaicuong · Pull Request #362 · changesets/action

Conversation

@dohaicuong

@dohaicuong dohaicuong commented Apr 10, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

I've encounter problem when using changesets/action when I'm using the private registry that is not npm.

Upon looking into it the problem seems to coming from the bellow line where it only check for npm registry name.

const authLine = userNpmrcContent.split("\n").find((line) => {
  // check based on https://github.com/npm/cli/blob/8f8f71e4dd5ee66b3b17888faad5a7bf6c657eed/test/lib/adduser.js#L103-L105
  return /^\s*\/\/registry\.npmjs\.org\/:[_-]authToken=/i.test(line);
});

However, beside npm registry, we also have github registry and custom domain gitlab registry.

// npm
//registry.npmjs.org/:_authToken

// github
//npm.pkg.github.com/:_authToken=TOKEN

// custom domain gitlab registry
//code.org.com/packages/npm/:_authToken=

Hence I'm making the change here to address for this problem.
Thank you the team for your work on maintaining this tool!

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Joozty, booleans-oss, lucasadrianof, rnegash, samhwang, charlie632, jaska120, dikaso, RodrigoHamuy, izayl, and 4 more reacted with thumbs up emoji
All reactions
  • 👍 14 reactions
dohaicuong added 2 commits April 10, 2024 11:14
@dohaicuong
support for other private registries
8134908
@dohaicuong
add changeset for changes
dec3baf
@changeset-bot

changeset-bot Bot commented Apr 10, 2024

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: dec3baf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@changesets/action Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dohaicuong dohaicuong mentioned this pull request Apr 10, 2024
Support private registry #363
Closed
@Joozty

Joozty commented May 3, 2024

Copy link
Copy Markdown

@Andarist can this be merged please?

dohaicuong and barakamwakisha reacted with eyes emoji
All reactions
  • 👀 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@booleans-oss

booleans-oss commented May 13, 2024

Copy link
Copy Markdown

+1 as this is exactly what I need

dohaicuong, idanfishman, platypusrex, barakamwakisha, lucasadrianof, rnegash, oscarteg, mr-pinzhang, dikaso, izayl, and 3 more reacted with thumbs up emoji
All reactions
  • 👍 13 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@brad-mccormick

brad-mccormick commented Jul 24, 2024

Copy link
Copy Markdown

I think this is moving in the right direction and thanks @dohaicuong for getting this PR going. I've had the same issue since last year and I'm just now coming back to it. Our packages are stored in a private Artifactory registry which utilizes basic auth (see: Artifactory Basic Auth). That means the .npmrc is expected to have username and _password fields. The proposed changes would still result in authLine being false.

npm has a set of supported fields for authentication which could be mirrored.
https://docs.npmjs.com/cli/v10/configuring-npm/npmrc#auth-related-configuration

For example:
:[_-](authToken|auth|password)=

There's also still some hardcoding of npm registry urls here. Maybe out of scope for this PR, but the reality is you could be publishing to more than one registry, so I'm not sure how useful this is.

action/src/index.ts

Lines 76 to 87 in dec3baf

fs.appendFileSync(
userNpmrcPath,
`\n//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}\n`
);
}
} else {
core.info("No user .npmrc file found, creating one");
fs.writeFileSync(
userNpmrcPath,
`//registry.npmjs.org/:_authToken=${process.env.NPM_TOKEN}\n`
);
}

dohaicuong and izayl reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@graffhyrum

graffhyrum commented Sep 19, 2024

Copy link
Copy Markdown

+1

dohaicuong reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dikaso

dikaso commented Nov 13, 2024

Copy link
Copy Markdown

Also waiting for this one. How can we help?

dohaicuong reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@izayl

izayl commented Feb 28, 2025

Copy link
Copy Markdown

any progress about this pr?

dohaicuong, kbader-godaddy, and HokkanenTeemu reacted with eyes emoji
All reactions
  • 👀 3 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mazipan-wego mazipan-wego mentioned this pull request Mar 27, 2025
fix: #424 - Publish in custom artifactory #425
Closed
@belfz

belfz commented Oct 17, 2025

Copy link
Copy Markdown

any chance this will be merged?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bluwy bluwy mentioned this pull request Jul 23, 2026
Remove npm auth handling in favor of docs #695
Merged
@bluwy bluwy closed this in #695 Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@dohaicuong @Joozty @booleans-oss @brad-mccormick @graffhyrum @dikaso @izayl @belfz
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.