Git Permissions Issue #208
-
Hey there Crazy Max. I'm trying to publish the contents of my
When I get to the publish action, I run into this error:
It looks like the error is happening here. However, I can't figure out why the Thanks in advance! |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
Hi @LandonSchropp, do you have a link to your repo? Edit: Nevermind LandonSchropp/landonschropp.com |
Beta Was this translation helpful? Give feedback.
-
@LandonSchropp Can you put this step before
I think one of the previous step write files with a different user (maybe sudo cmd somewhere?) in your workflow |
Beta Was this translation helpful? Give feedback.
-
Thanks for the quick reply! Ah, you're absolutely right. When I run the My workflow was previously written in the old GitHub Actions format. Does the new format change how the user interacts with the action? I'm a little confused on how Docker plays in to the new workflow. Does your action run as a non-root user? I tried this as a quick fix, but it didn't work:
This doesn't seem to be an issue with this action, so I'll close the issue. The only other thing I can think of is that my Below is the output from that command. If you're curious and want to see the rest of the workflow, it's hosted here.
|
Beta Was this translation helpful? Give feedback.
-
Indeed, actions using Docker write files with root permissions unfortunately. That's why all my actions use Typescript because this is native and also more efficient (not build or download Docker image for the action). What you can do to fix this issue with borales/actions-yarn is chown your workspace with So looking at your workflow I suggest to not use Docker actions when it's possible. In your case your workflow could run faster with this configuration:
You can also use cache to improve the process. Take a look at this workflow I use for one of my projects. |
Beta Was this translation helpful? Give feedback.
-
That did the trick! Thanks for all the help and for the explanation. 🙂 I also appreciate you pointing out cache and showing me your workflow. I wish I had seen that a few hours ago—it would have made this process much quicker. Thanks again! |
Beta Was this translation helpful? Give feedback.
-
@LandonSchropp See limitation section also. You cannot use (for now) the |
Beta Was this translation helpful? Give feedback.
-
That's strange, it seems to be working for me. 🤷 |
Beta Was this translation helpful? Give feedback.
@LandonSchropp
Indeed, actions using Docker write files with root permissions unfortunately. That's why all my actions use Typescript because this is native and also more efficient (not build or download Docker image for the action).
What you can do to fix this issue with borales/actions-yarn is chown your workspace with
sudo chown -R $(id -u):$(id -g) ${GITHUB_WORKSPACE}
after but it could be slow if you've got many files and it's awful :)So looking at your workflow I suggest to not use Docker actions when it's possible. In your case your workflow could run faster with this configuration: