【发布时间】:2019-09-01 06:27:02
【问题描述】:
- 电子制造商版本:20.38.5
- 目标:Windows ia32 和 x64
我正在尝试将项目推送到私有存储库中的 GitHub 版本。 主要目标是Win ia32和x64。
我通过以下方式在控制台中设置令牌:
set GH_TOKEN=<blabla>
在 package.json 文件中:
"publish": {
"provider": "github",
"repo": "electron-todo-tasks",
"owner": "AndreD23",
"host": "github.com",
"protocol": "https",
"releaseType": "draft",
"token": "<blablabla>",
"private": true
}
我是唯一可以访问该项目的人,因此更新文件中的令牌显然不是问题。
但是,当我跑步时:
electron-builder --x64 --ia32 --publish always
它显示了错误:
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"
我将附上整个错误。
2019-03-22T13_04_27_992Z-debug.log
我尝试将选项始终更改为onTag 或onTagOrDraft,并将releaseType 更改为release。
我尝试先在 GitHub 上手动创建草稿,不起作用。
我尝试将存储库公开以进行测试,但也没有用。
我尝试重新生成令牌两次并更新了环境、控制台和 package.json,但不起作用。
有没有我遗漏的配置? Electron 发布到 GitHub 需要做什么?
在错误中,它说找不到https://github.com/repos/AndreD23/electron-todo-tasks/releases。在网络浏览器上打开它,它返回404。我觉得这个链接有点奇怪,因为它在 github.com 之后添加了单词 repos,并在浏览器中删除它加载正常。这个词是自动设置的吗?
【问题讨论】: