How does one enable private github API support? It seems that GH_TOKEN is the only thing required but for some reason my app continues to make HTTP requests to the repo URL instead of api.github.com. Do I need to use setFeedURL?
Hi @akorchev. You just need to set the GH_TOKEN environment variable. Please confirm that it is being picked up by your app by checking process.env.GH_TOKEN in your app. You can also set GH token programmatically using the same process.env.GH_TOKEN = your_gh_token if it works better for you.
N.B. private Github auto update is not yet working on Mac OSX, but I see you're on Windows so it should be fine
Hi @AlienHoboken. Do you mean to set GH_TOKEN during build time? If yes - I was setting it but it wasn't being picked up when the application was running. I checked the implementation and it looks as if the application needs GH_TOKEN at runtime which I don't know how to set on the client machine.
I ended up using setFeedUrl:
autoUpdater.setFeedURL({
token: '***',
owner: '***',
repo: '***'
})
When I did that auto updates started working. BTW I tried on macOS and it also worked there. The only thing that didn't was starting the new version after the update was downloaded. But when I started it manually it was the latest version! Thanks for the great work!
which I don't know how to set on the client machine.
This provider ONLY if you have org and create DEDICATED user — only in this case you can share access token somehow. Otherwise you should use or proxy (https://github.com/electron-userland/electron-builder/issues/1370#issuecomment-287760243), or s3.
We should add note that private GitHub provider only for very special cases and not intended/suitable for all users.
You got it, @akorchev. Glad its working.
@develar agreed. My org actually have a separate release-only repository to distribute releases so source is locked down, and we distribute to controlled machines. It is a useful feature since no server is required, but special use case
Does electron-updater work with update servers such as https://github.com/GitbookIO/nuts? If yes do I just need to call setFeedURL? I have a nuts server deployed already. I just want to get rid of Squirrel for Windows.
My org actually have a separate release-only repository to distribute releases so source is locked down
Why not use s3 in this case? because github storage is free?
Does electron-updater work with update servers such as https://github.com/GitbookIO/nuts
Yes. Use generic provider and set url to https://YOUR_SERVER_URL/download as first provider (for auto-update), and second github (to publish to private repo).
update: downside is that url https://YOUR_SERVER_URL/download always points to a latest release files. So... well, yeach, we need to support nuts server explicitly — but for now no such requests.
The adoption of additional platforms is not preferred within the org.
Also, can you use S3 with credentials through electron-updater?
can you use S3 with credentials through electron-updater
I suppose yes, since we use AWS SDK. You can set aws credentials env. But I am not sure.
The adoption of additional platforms is not preferred within the org.
+1 That's why I didn't reject your PR :)
@akorchev Did you ever get the NSIS installer working with Nuts? I've got a private repository, so I wanted to control distribution through Nuts.
Yes, I did. Here is how I configured it (I am using the programming API):
builder.build({
config: {
publish: [
{
provider: 'generic',
url: 'http://example.com/download'
},
{
provider: 'github'
}
],
@akorchev Can you tell me about the use of the server when using Nuts to distribute the releases, please? Do you get any overload or everything just worked fine?
Most helpful comment
Yes, I did. Here is how I configured it (I am using the programming API):