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 when running this action from an EC2 hosted runner #2181

Closed
john-jerome opened this issue Jul 31, 2023 · 2 comments
Closed

Error when running this action from an EC2 hosted runner #2181

john-jerome opened this issue Jul 31, 2023 · 2 comments

Comments

@john-jerome
Copy link

Subject of the issue

I'm trying to run this actions on an EC2 hosted runner and I'm getting the following error:

Prepare git configuration
/usr/bin/git config --global --name-only --get-regexp safe.directory /actions-runner/_work/dbt-source-layer/dbt-source-layer
fatal: $HOME not set
/usr/bin/git config --global --add safe.directory /actions-runner/_work/dbt-source-layer/dbt-source-layer
fatal: $HOME not set
Error: The process '/usr/bin/git' failed with exit code 128

I'm using a PAT with all the necessary scopes on the repo.

Screenshot 2023-07-31 at 11 46 08

Am I doing something wrong?
Thanks!

@peter-evans
Copy link
Owner

Hi @john-jerome

This explanation might be the same problem: https://stackoverflow.com/a/56957868/11934042

The solution described won't work in this case. I think you need to run the EC2 instance as a user, not root. The root user doesn't have a $HOME directory, according to the blog post linked in that answer.

@peter-evans
Copy link
Owner

Closing this for now.

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

2 participants