-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
electron-updater Support for private Github repository #1266
Comments
As your app code is available for everyone, electron updater can use only public resources. |
Is there a reason for that limitation? Why can't electron-updater access private resources with a proper authentication token? |
Where a proper authentication token can be stored? Or do you want to somehow set it programmatically in setFeedURL? |
The use case is like this: We have an application which will be distributed on controlled machines, not distributed to the public. Therefore if we create a Github user with read only privileges to our private repository we are fine with storing an authentication token for that user on the machine (in an environment variable, app-update.yaml, wherever) so they can pull releases to update. Would this be possible with electron-updater? And if so, could you point me in the correct direction? |
You need to write own provider and use rest api instead of public URL to download files and get latest info. Would you like to help and create PR? |
Yeah if it's doable then I'm fine writing it and submitting a PR. You think the best way to proceed is a new provider? Or should github provider be extended to support private repositories? |
I prefer new provider because code will be totally rewritten (no common code). But provider name in the conf will be still |
Sounds good, will update with PR |
Creates a PrivateGitHubProvider for auto updater. Used if the GH_TOKEN environment variable is set. Also adds the ability to all providers to pass custom headers to the download for the update file.
Submitted PR #1343 |
Please try electron-updater 1.9.0 (thanks to @AlienHoboken) |
electron-builder version: 13.7.0:
electron-updater version: 1.6.4
Target Windows:
Electron updater seems unable to locate my private Github repository even when the GH_TOKEN environment variable is set. I've tried setting the env variable through the system settings, programatically by altering
process.env.GH_TOKEN
, and even passing thetoken
parameter in app-update.yml (which seems it might be respected after looking into electron-updater's code). I've verified via logging thatprocess.env.GH_TOKEN
is properly set to my token which has all permission scopes granted.Is there something I am missing or is there a known issue with private Github repositories? If I make the repo public then updater finds it and updates perfectly, so the integration is good.
The text was updated successfully, but these errors were encountered: