Cannot Publish to Private GitHub - 404 Not Found - Method undefined url
See original GitHub issue- Version: 20.38.5
- Target: Windows ia32 and x64
The main target is Win ia32 and x64.
I setted the token in the console by
set GH_TOKEN=<blabla>
And at the package.json file:
"publish": {
"provider": "github",
"repo": "electron-todo-tasks",
"owner": "AndreD23",
"host": "github.com",
"protocol": "https",
"releaseType": "draft",
"token": "<blablabla>",
"private": true
}
I’m the only one who will have access to the project, so updating the token in the file apparently not a problem.
But, when I run:
electron-builder --x64 --ia32 --publish always
It shows me the error:
Error: Cannot cleanup:
Error #1 --------------------------------------------------------------------------------
HttpError: 404 Not Found
"method: undefined url: https://github.com/repos/AndreD23/electron-todo-tasks/releases\n\nPlease double check that your authentication token is correct. Due to security reasons actual status maybe not reported, but 404.\n"
I’ll attach the hole error.
2019-03-22T13_04_27_992Z-debug.log
I tried to change the option always to onTag or onTagOrDraft and change releaseType to release.
I tried to manually create a draft on GitHub first, not works.
I tried to make the repository public for tests, not work too.
I tried to regenerate the token two times and updated at the envs, console and package.json, not works.
There are some configuration that I’ve missed? What I have to do for the electron publish to GitHub?
At the error, it says that cannot find https://github.com/repos/AndreD23/electron-todo-tasks/releases. Openning it on web browser, it returns 404. I found strange the link, because it adds the word “repos” after github.com, and removing it in the browser it loads fine. This word is setting automatically?
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top GitHub Comments
Hi @AndreD23
This works for me, on PowerShell type this
[Environment]::SetEnvironmentVariable("GH_TOKEN","my-personal-token","User")
and be sure that you package.json will be like this:And then I run this command
yarn run publish
and this is how is mypublish
is on my package.json"publish": "build --win -p always"
don’t forget to close and open a new PowerShell terminalI’ve had the same issue as well and the problem is indeed that the automatically generated URL contains
/repos/
which breaks the link. Not specifyinghost
asgithub.com
andprotocol
ashttps
solved the problem.@maintainers: Is that the intended behavior?