John Dyer
1 min readSep 26, 2019

--

To use a private GitHub repository you would have to include your GitHub access token in the code, and configure electron-updater to use it when it checks for updates. In “main.js” before the line autoUpdater.checkForUpdatesAndNotify(), you could do that with:

autoUpdater.setFeedURL({
provider: 'github',
owner: [YOUR USERNAME],
repo: [YOUR REPO],
token: [YOUR ACCESS TOKEN],
});

While this should work, including your access token in the code like this is not a good idea in most cases. Anyone who uses your app would be able to look into the source code, find your token, and use it to access any private repository for your GitHub account.

--

--

John Dyer

I’m a software engineer in the Boston area, specializing in web development. I also build mobile and desktop apps using React Native and Electron.