question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Enable GitHub authentication in Electron Updater

See original GitHub issue
  • Version: 15.0.0
  • Electron Updater: 1.8.1
  • Target: Mac

After configuring all the publish settings for GitHub Enterprise, I am able to publish updates, but not pull them down using Electron Updater. I receive the following error when calling autoUpdater.checkForUpdates():

Error: Unable to find latest version on GitHub (https://git.mycompany.org/my-organization/content-manager/releases/latest), please ensure a production release exists

When I go to that URL, there is a release available (not a draft or pre-release, a full release). Upon further investigation I discovered that this 404 is due to lack of authentication. GHE expects that all access is authenticated, not just for specific actions like in GitHub hosted.

It would be awesome to be able to pass a Personal Access Token to the request (configured at the time of checking for updates, not packaging) in this form: https://git.mycompany.org/my-organization/content-manager/releases/latest?access_token=xxxxxxx.

If this is an easy fix it would be greatly appreciated. I might recommend using node-github for all GitHub interactions since it seamlessly handles differences between hosted and enterprise versions, as well as offers multiple authentication schemes.

Thank you!

Ben

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:2
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rossanmolcommented, Mar 4, 2017

Would be great to implement this feature.

0reactions
rossanmolcommented, Mar 24, 2017
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to config electron-updater for a private GitHub Repo #14
Hello, I can't understand from the given examples how to configure the updater. I have private company git repo on a company website...
Read more >
electron-updater Support for private Github repository #1266
I've tried setting the env variable through the system settings, programatically by altering process.env.GH_TOKEN , and even passing the token ...
Read more >
electron-builder updater not using authorization (or ... - GitHub
As part of it, I added a new way to authenticate the updater. electron-builder/packages/electron-updater/src/AppUpdater.ts.
Read more >
Electron Updater error: Only one auth mechanism allowed
I'm having the same issue with a private GitHub repo. I haven't made any changes at all in several weeks, but all of...
Read more >
Set useSessionCookies to enable the Electron-Updater to ...
I was experimenting with requiring authentication on my update server which needs certain cookies set. I discovered I could access the session ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found