reviewdog / action-misspell

Run misspell with reviewdog
https://github.com/marketplace?type=actions&query=reviewdog
MIT License
89 stars 27 forks source link

reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128 #43

Closed Wanghx0991 closed 2 years ago

Wanghx0991 commented 2 years ago

hi, recently, when we use the action-misspel during the Github Actions, we found this error: reviewdog: failed to run 'git rev-parse --show-prefix': exit status 128 , do you have any suggestion?
The relative link is here: https://github.com/aliyun/terraform-provider-alicloud/runs/6002479769?check_suite_focus=true

nabeken commented 2 years ago

I'm also hitting this and I found this is a side effect of https://github.blog/2022-04-12-git-security-vulnerability-announced/

So far I'm working around this by https://github.com/nabeken/action-misspell/commit/11be15a96e39baabff4f1bb4bfaf0d4cc2409f9c

Also, I have opened a support ticket for Github to discuss what should we (actions author) do for this.

Detail

If Actions is running inside a container, /github/workspace will be mounted but it has a different ownership than a executing user (root) so Git just refused to work with the following message:

fatal: unsafe repository ('/github/workspace' is owned by someone else)
To add an exception for this directory, call:

    git config --global --add safe.directory /github/workspace
kimromi commented 2 years ago

I hope this is helpful. https://github.com/reviewdog/reviewdog/issues/1158#issuecomment-1097649732

haya14busa commented 2 years ago

close as dup of https://github.com/reviewdog/reviewdog/issues/1158#issue-1202862728