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

Error: GitHub Personal Access Token is not set, neither programmatically, nor using env "GH_TOKEN" #8676

Open
developerautomationkit opened this issue Nov 11, 2024 · 2 comments

Comments

@developerautomationkit
Copy link

developerautomationkit commented Nov 11, 2024

  • Electron-Builder Version:
  • Node Version:
  • Electron Version:
  • Electron Type (current, beta, nightly):
  • Target:

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

Iam trying to use a PAT

GH_TOKEN: ${{ secrets.RELEASE_PAT }} -- doesnt work ... using a fine grained PAT with contents permission added to the repository as secret...
GH_TOKEN: ${{ secrets.GITHUB_TOKEN}} -- works ... but I actually need the pat for pushing my release to different repo (

I have this in my electron builder config yml

   directories:
  output: dist
  buildResources: buildResources

files:
  - packages/**/dist/**

win:
  target:
    - nsis

publish:
  provider: github
  owner: me
  repo: seperate_public_repo
  private: true
   

Basically iam pushing to a private repo but want my release to be pushed in the github action to a seperate public repo

@developerautomationkit
Copy link
Author

developerautomationkit commented Nov 11, 2024

I just ran the command locally to push the seperate repo directly ... which works ... but if I do my said setup in github actions it still does not... for some reason it does not recognize any kind of personal acces tokens like this ?

Does not recognize(in gh actions) :
GH_TOKEN: ${{ secrets.RELEASE_PAT }}

Works (locallly):
export GH_TOKEN=my token
./node_modules/.bin/electron-builder --config electron-builder.yml --publish always

@hichemBAALI
Copy link

I just ran the command locally to push the seperate repo directly ... which works ... but if I do my said setup in github actions it still does not... for some reason it does not recognize any kind of personal acces tokens like this ?

Does not recognize(in gh actions) : GH_TOKEN: ${{ secrets.RELEASE_PAT }}

Works (locallly): export GH_TOKEN=my token ./node_modules/.bin/electron-builder --config electron-builder.yml --publish always

Same for my case. Did you figure out any solution ?

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

2 participants