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

Parameter token or opts.auth is required #107

Closed
shinny-hongyan opened this issue Apr 22, 2020 · 9 comments
Closed

Parameter token or opts.auth is required #107

shinny-hongyan opened this issue Apr 22, 2020 · 9 comments
Assignees
Labels
bug Something isn't working In-progress

Comments

@shinny-hongyan
Copy link

well I run this actions and get the error
Parameter token or opts.auth is required
So, am I do some thing wrong?

@ppremk
Copy link
Owner

ppremk commented Apr 28, 2020

@shinny-hongyan do you have the screen capture or the output of the log file? Please do share your repo if its public.. I can help take a look.

@ppremk ppremk self-assigned this May 5, 2020
@TomerFi
Copy link
Collaborator

TomerFi commented Sep 29, 2020

@ppremk

Happens to me on a private repo:

Run actionsdesk/[email protected]
  with:
    filesizelimit: 5242880
/home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:7124
            throw new Error('Parameter token or opts.auth is required');
            ^

Error: Parameter token or opts.auth is required
    at Function.getAuthString (/home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:7124:19)
    at Function.getOctokitOptions (/home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:7089:29)
    at new GitHub (/home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:7073:22)
    at Object.104 (/home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:494:17)
    at __webpack_require__ (/home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:22:30)
    at startup (/home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:37:19)
    at /home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:41:18
    at Object.<anonymous> (/home/runner/work/_actions/actionsdesk/lfs-warning/v1.1/dist/index.js:44:10)
    at Module._compile (internal/modules/cjs/loader.js:959:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:995:10)

@TomerFi
Copy link
Collaborator

TomerFi commented Sep 29, 2020

After tracing the error, I found this as the source.
I was able to work around this issue by adding the token as an environment variable.
I'm not sure I like this workaround.

      - uses: actionsdesk/[email protected]
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          filesizelimit: '5242880'

Any other solutions, please?

@ppremk ppremk added the bug Something isn't working label Sep 29, 2020
@ppremk
Copy link
Owner

ppremk commented Sep 29, 2020

Hi @TomerFi 👋

Thank you for catching this, I have blocked some time this Friday to dive into this. Keep you posted. 🙇

@TomerFi
Copy link
Collaborator

TomerFi commented Sep 29, 2020

Thanks!

Great action, I really love using it.
Thank you!

@ppremk
Copy link
Owner

ppremk commented Oct 2, 2020

@TomerFi
I've made some changes and have merged it in the master branch. There is some permission issue I'm waiting on to be able to publish the new release.

Update:
@TomerFi
New release have been released to the marketplace. Please let us know how it goes. The README.md has been updated with new usage.

@TomerFi
Copy link
Collaborator

TomerFi commented Oct 11, 2020

@ppremk
Sorry for the delayed response, I was away.
Thank you very much, I'll check it out as soon as I can.
:-)

@TomerFi
Copy link
Collaborator

TomerFi commented Oct 12, 2020

@ppremk
I can confirm that v2.0 fixed the issue for me.
I removed the "env" workaround, the following configuration now works well on my organization's private repo:

- name: Warn for large files
  uses: actionsdesk/[email protected]
  with:
    filesizelimit: '5242880'

Thank you!

@ppremk
Copy link
Owner

ppremk commented Oct 12, 2020

I can confirm that v2.0 fixed the issue for me.
I removed the "env" workaround, the following configuration now works well on my organization's private repo:

@TomerFi thank you for the confirmation. Im glad it worked out nicely.

Let's close this one out. ✅

@ppremk ppremk closed this as completed Oct 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working In-progress
Projects
None yet
Development

No branches or pull requests

3 participants