question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

publish command --auth-token flag not working

See original GitHub issue

I am attempting to publish to a private github repo. I either get a 404:

Electron forge was terminated:
{"code":404,"status":"Not Found","message":"{\"message\":\"Not Found\",\"documentation_url\":\"https://developer.github.com/v3\"}"}

Or, if providing --auth-token in the command line, I get a 401:

Electron forge was terminated:
{"code":401,"status":"Unauthorized","message":"{\"message\":\"Bad credentials\",\"documentation_url\":\"https://developer.github.com/v3\"}"}

My forge config looks like this:

{
        "forge": {
            "make_targets": {
                "win32": [
                    "squirrel"
                ],
                "darwin": [
                    "dmg"
                ],
                "linux": [
                    "deb",
                    "rpm"
                ]
            },
            "electronPackagerConfig": {
                "icon": "./src/assets/favicon",
                "ignore": [
                    ".idea/"
                ]
            },
            "electronWinstallerConfig": {
                "name": "blahblah_repo"
            },
            "electronInstallerDebian": {},
            "electronInstallerRedhat": {},
            "github_repository": {
                "owner": "blahblah_owner",
                "name": "blahblah_repo"
            }
        }
    },

For the auth token value, I provide a personal access token for the repo, is that correct or is it something else? If it’s correct, what else am I doing wrong?

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Schmaverycommented, Jul 8, 2022

@guizmaii I think you may have had a different issue there. Maybe you figured it out but since I ran into this too I thought I’d mention the solution for anyone finding this later. Turns out that yarn publish is a command that tries to publish the package to npm. You could try yarn run publish instead to see if that works

1reaction
maleptcommented, Mar 31, 2017

On OSX/Linux, running GITHUB_TOKEN=whatever electron-forge publish will be sufficient.

Read more comments on GitHub >

github_iconTop Results From Across the Web

publish command --auth-token flag not working #125 - GitHub
I am attempting to publish to a private github repo. I either get a 404: Electron forge was terminated: {"code":404,"status":"Not Found" ...
Read more >
`npm publish` and `npm install` fail depending on `.npmrc ...
Workaround 1: --registry command line flag. When running npm publish , add the --registry flag. This flag enables developers to specify the ...
Read more >
rush publish
To commit changes and publish packages, you must use the --commit flag and/or the --publish flag. Optional arguments: -h, --help Show this help...
Read more >
Troubleshoot your on-premises scanner deployment
Use the content in this article to help you troubleshoot your on-premises scanner deployment. Troubleshooting using the scanner diagnostic tool.
Read more >
npm packages in the Package Registry - GitLab Docs
Watch a video demo of how to publish npm packages to the GitLab Package Registry. ... }/packages/npm/:_authToken=${CI_JOB_TOKEN}">.npmrc - npm publish.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found