and doesn't match, github requires onwer


I’m not able to find a solution about this problem

Following this documentation I get a wrong npm install package url doesn’t exist: “npm install @orsifrancesco/react-mini-alert-confirm@1.1.5”

Which is the solution to publish the package to github without errors?

Thank you in advance


There are 2 different .npmrc configurations you can use when publishing a package:

With this one, only packages in the @OWNER scope will connect to GitHub:


With this one, GitHub will act as a proxy for packages that aren’t in the @OWNER scope:


I made a .npmrc file including registry= ,

The configuration in the Stack Overflow question appears to be a hybrid between the two, which won’t work. GitHub needs to know the OWNER of the package being published.

You will also need to add the following element to your package.json:

"repository" : {
    "type" : "git",
    "url": "ssh://",
    "directory": "packages/name"

Could you try doing this, creating one of the .npmrc files above and then:

export GITHUB_TOKEN=<PAT with  repo, read:packages and write:packages scope>
npm publish

Please let me know if you have any more luck with this. If it works, I’ll answer on Stack Overflow as well.

1 Like


Thank you for your answer :slight_smile:

I tried your solution with another package, unfortunately I get the same result.

Maybe I was thinking wrong about the possibility to publish to and with just npm publish command.


Maybe I was thinking wrong about the possibility to publish to 1 and 1 with just npm publish command.

I’ve done some experimenting and it seems this is possible. Could you try the following:

  1. Make sure you don’t have a .npmrc file with the registry= or @OWNER:registry= setting
  2. Login to GitHub Package: npm login --registry=
  3. Publish your package: npm publish --registry=

Here is the workflow I used to test this with:


    runs-on: ubuntu-latest

    - name: create package.json
      run: |
        cat <<- EOF > package.json
          "name": "@${{ github.repository }}",
          "version": "1.0.0-g${{ github.sha }}",
          "repository": "${{ github.repository }}"
    - run: echo '//${GITHUB_TOKEN}' > .npmrc
    - run: npm publish --registry=
        GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Is that the kind of thing you were after?

1 Like

Sorry, I’m replying only now.
Tried now… Same problem… but I really appreciate :slight_smile:


Tried now… Same problem… but I really appreciate :slight_smile:

Could you create an example repository with what you’re trying to do? That way I can fork it and send you a PR with suggested changes. If you could set up a GitHub Actions workflow as well so I can see the errors.