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

incorrect environment on runner, unable to checkout repo #114

Open
davegravy opened this issue Oct 2, 2022 · 0 comments
Open

incorrect environment on runner, unable to checkout repo #114

davegravy opened this issue Oct 2, 2022 · 0 comments

Comments

@davegravy
Copy link

davegravy commented Oct 2, 2022

When I try to run actions/checkout without supplying my personal access token (PAT) on my EC2 runner I receive an error: "remote: Repository not found." When I supply my PAT using the token the checkout is successful.

  do-the-job:
    name: Do the job on the runner
    needs: start-runner # required to start the main job when the runner is ready
    runs-on: ${{ needs.start-runner.outputs.label }} # run the job on the newly created runner
    steps:
      - name: clone repo
        uses: actions/checkout@v3
        with:
          token: ${{secrets.GH_PERSONAL_ACCESS_TOKEN}} #without this line it fails

On a Github runner I don't need to supply the token, I think because the action finds it at ${{ github.token }} so my hosted runner must not be receiving this. I inspected the github context on the runner with echo and all looks well except I can't obviously confirm the token (it's censored).

Others seemingly are able to use actions/checkout on their EC2 runner without supplying a token, example: here.

This may be a problem with how I prepared my runner EC2 image however I'm not sure how to diagnose this.

@davegravy davegravy changed the title incomplete environment on runner, unable to checkout repo incorrect environment on runner, unable to checkout repo Oct 2, 2022
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

1 participant