7

I have an electron app for which I want to set up an auto-updater. I followed this blog post and made a small demo, it worked great with some small changes. Then I tried to implement it with my real project and now I am getting an error.

GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN"

I already have electron-builder.yml file and i even tried setting up GT_TOKEN anv variable but it still throws same error.

www.amitpatil.me
  • 3,001
  • 5
  • 43
  • 61

2 Answers2

2

Forget about that post, I tried to implement it but faced many issues with that.

Try this one.

But take a note that For macOS, you will need a code-signing certificate.

For windows and Linux it works seemlessly.

Just follow the instructions.

For exporting the token, you need to add the export line at the end of the .bashrc or .profile in Linux/Mac. Google it if you don't know how.

Make sure to restart IDE/Terminal to inherit latest env variable.

deadcoder0904
  • 7,232
  • 12
  • 66
  • 163
Vaibhav Bhavsar
  • 493
  • 3
  • 15
2

Well, I found the solution, I set env key in .bash_profile and it worked. I don't know why setting GH_TOKEN in the main.js file and in electron_builder.yml file didn't work. It works in the beginning but then when I added more configuration to package.json file it started throwing this error.

www.amitpatil.me
  • 3,001
  • 5
  • 43
  • 61