Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github action - ##[error]File not found: 'tar'

whenever I run using runs-on: self-hosted it always return an below error but there is no error if I run using runs-on: ubuntu-latest.

on:
  push:
jobs:
  test:
    runs-on: self-hosted
    steps:
      - uses: actions/checkout@v2
      - name: Run tests
        run: |
          echo hi

enter image description here

This machine is using CentOS Linux 7 (Core) - Architecture: x86-64 and for this job, I have created new user called github. Is this because this user cannot access this /usr/bin/tar when running from workflow file?

like image 860
Rusly - Mices Avatar asked Dec 06 '25 08:12

Rusly - Mices


1 Answers

I faced the same error message. The problem seemed that the action runner directory had a empty .path file. So, I guess it used this to set the path, which effectively removed all path. My solution was to remove the empty .path file

like image 79
user3481465 Avatar answered Dec 08 '25 09:12

user3481465



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!