Skip to content
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

Auto Updating With Private Github Repo #19

Closed
peterkrieg opened this issue Jun 1, 2017 · 6 comments
Closed

Auto Updating With Private Github Repo #19

peterkrieg opened this issue Jun 1, 2017 · 6 comments

Comments

@peterkrieg
Copy link

Hello,

First of all, thank you for an excellent repo - this has been very helpful.

I need to have an electron app autoupdate with a private GH repo. (or other means, but has to be private). It looks like this is not so simple to do (example thread here).

Do you recommend pursuing the Github method, or using simple http-server (somehow making that private?)

Thank you for any help or suggestions!

@develar
Copy link
Contributor

develar commented Jun 1, 2017

electron-userland/electron-builder#1370

Do you recommend pursuing the Github method, or using simple http-server (somehow making that private?)

If you mean that your user will somehow use credentials to update, then yes, you need custom server. Use headers to pass auth data.

Or you can investigate if authenticated s3 suitable for you and file issue to support it.

@peterkrieg
Copy link
Author

Thanks for the quick response @develar !

So, I actually got it to work where auto updater detects there is an update available, but then fails to actually download it. Does this mean the authentication with Github is working, or there is still something going wrong?

I got the auth with private repo to work by using the autoUpdater.setFeedURL() method before calling checkForUpdates(), as discussed in this issue.

This is the error I see when using electron-log:

[2017-06-01 11:48:37:0733] [info] Checking for update
[2017-06-01 11:48:38:0607] [info] Found version 2.1.12 (url: https://api.github.com/repos/ic-software/electron-review-tool/releases/assets/4007648)
[2017-06-01 11:48:38:0608] [info] Downloading update from https://api.github.com/repos/ic-software/electron-review-tool/releases/assets/4007648
[2017-06-01 11:48:39:0355] [warn] Error: Update download failed. The server sent an invalid response. Try again later.

I'm wondering if this is still an issue with Github authenticating, or if it is a completely separate issue with autoUpdater I'm experiencing.

@peterkrieg
Copy link
Author

Update: I got auto-updating working with simple HTTP request over amazon S3.

I never did get auto-updater to work with private Github repos. If someone has a solution I'm still curious to see it, but otherwise this thread can be closed, thanks!

@iffy
Copy link
Owner

iffy commented Jun 6, 2017

@peterkrieg the author of electron-updater says that private GitHub repos don't work. Glad you got S3 going!

@iffy iffy closed this as completed Jun 6, 2017
@p3nGu1nZz
Copy link

@peterkrieg @iffy i got this working fine with 2 repos (one private one for source code, and public one with just releases no source code). In the root of my package.json I added

"repository" : { 
    "type" : "git", 
    "url" : "https://github.com/my-app-release.git"
  },

i just named the repos the same but appended -release to the public release repo

@naheller
Copy link

@1-14x0r a two-repo setup like this would be ideal for me. is your -release repo completely empty except for the release artifacts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants