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

has-changes breaks with errors when running 'git diff' #9

Closed
yanjunz97 opened this issue May 16, 2022 · 0 comments · Fixed by #10
Closed

has-changes breaks with errors when running 'git diff' #9

yanjunz97 opened this issue May 16, 2022 · 0 comments · Fixed by #10
Assignees

Comments

@yanjunz97
Copy link

yanjunz97 commented May 16, 2022

Hi @antoninbas I notice since April 13, the has-changes running by the merged commits in Antrea seems all having the following error.

...
BASE SHA: 0ab64d08dee5bdf9ddafc39345526d97f677bb5e
error: Could not access '0ab64d08dee5bdf9ddafc39345526d97f677bb5e'
Error when running 'git diff'
This is expected when the repo was not checked-out properly, or after a force push
Setting 'has_changes' to 'yes'

The earliest one with this error I found was at https://github.com/antrea-io/antrea/runs/6012588879?check_suite_focus=true
And here are a list of recent checks with the error
https://github.com/antrea-io/antrea/runs/6460058122?check_suite_focus=true
https://github.com/antrea-io/antrea/runs/6454417991?check_suite_focus=true
https://github.com/antrea-io/antrea/runs/6448704695?check_suite_focus=true

@antoninbas antoninbas self-assigned this May 17, 2022
antoninbas added a commit to antoninbas/has-changes that referenced this issue May 17, 2022
About a month ago a Git security vulnerability was annouced:
https://github.blog/2022-04-12-git-security-vulnerability-announced/
The security patch to address this vulnerability prevents Git from
looking at .git folders owned by other users, unless these directories
are added to a "safe" list in the Git config.
This Github Action uses a Docker container based on Ubuntu 20.04, and
the version of Git shipped with Ubuntu 20.04 was also patched. As a
result, it is now necessary for this Action to set the repo directory as
safe *inside the container*, given that the owner of the repo directory
(Github runner user) is different from the Docker user
(root). Otherwise, all Git commands fail.

See also actions/checkout#760.

Fixes antrea-io#9

Signed-off-by: Antonin Bas <abas@vmware.com>
antoninbas added a commit that referenced this issue May 17, 2022
About a month ago a Git security vulnerability was annouced:
https://github.blog/2022-04-12-git-security-vulnerability-announced/
The security patch to address this vulnerability prevents Git from
looking at .git folders owned by other users, unless these directories
are added to a "safe" list in the Git config.
This Github Action uses a Docker container based on Ubuntu 20.04, and
the version of Git shipped with Ubuntu 20.04 was also patched. As a
result, it is now necessary for this Action to set the repo directory as
safe *inside the container*, given that the owner of the repo directory
(Github runner user) is different from the Docker user
(root). Otherwise, all Git commands fail.

See also actions/checkout#760.

Fixes #9

Signed-off-by: Antonin Bas <abas@vmware.com>
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

Successfully merging a pull request may close this issue.

2 participants