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: HOME is not defined #184

Open
gilShin opened this issue May 30, 2021 · 4 comments
Open

Error: HOME is not defined #184

gilShin opened this issue May 30, 2021 · 4 comments

Comments

@gilShin
Copy link

gilShin commented May 30, 2021

I start my hosted runner and when it gets to the ssh-key-action step, I get the error message in the subject.
When I ssh into the runner and executes:
echo $HOME, I get /home/ubuntu as expected

What am I missing here?

@chekalsky
Copy link

chekalsky commented Jun 1, 2021

I've got the same on a self-hosted runner.

My workaround:

- run: mkdir -p /home/runner && chmod -R 777 /home/runner
- run: echo "HOME=/home/runner" >> $GITHUB_ENV

@shimataro
Copy link
Owner

Hi, @gilShin @chekalsky
Thank you for your report, and sorry for late response.

I start my hosted runner and when it gets to the ssh-key-action step, I get the error message in the subject.

It looks strange... 🤔
I found issue actions/runner#1864, you might want to read it!

@robertglonek
Copy link

same issue here, self-hosted ubuntu-latest

@martijngastkemper
Copy link

I've fixed this issue by adding an env to the step.

      - name: Install SSH key
        uses: shimataro/ssh-key-action@v2
        env:
          HOME: /root
        with:
          .....

I only have this issue on a custom runner, not on the default Ubuntu runners provided by GitHub.

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

5 participants