forge: publish command --auth-token flag not working
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?
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (8 by maintainers)
Commits related to this issue
- Merge pull request #125 from electron/forge-arch-squirrel chore: automatically add arch to squirrel installer filename — committed to electron/forge by felixrieseberg 6 years ago
@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 tryyarn run publish
instead to see if that worksOn OSX/Linux, running
GITHUB_TOKEN=whatever electron-forge publish
will be sufficient.