ssh-key-action icon indicating copy to clipboard operation
ssh-key-action copied to clipboard

Error: HOME is not defined

Open gilShin opened this issue 3 years ago • 4 comments

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?

gilShin avatar May 30 '21 09:05 gilShin

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

chekalsky avatar Jun 01 '21 08:06 chekalsky

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... :thinking: I found issue https://github.com/actions/runner/issues/1864, you might want to read it!

shimataro avatar Oct 30 '22 14:10 shimataro

same issue here, self-hosted ubuntu-latest

robertglonek avatar Sep 07 '23 21:09 robertglonek

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.

martijngastkemper avatar Sep 20 '23 17:09 martijngastkemper