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

Fix git unsafe repository error on ci test #985

Merged
merged 1 commit into from May 6, 2022

Conversation

buzztaiki
Copy link
Contributor

fixes #983

I set safe.directory to avoid the following error in CI

fatal: unsafe repository ('/__w/rbs/rbs' is owned by someone else)

Cause

Starting with git v2.35.2, it seems to cause an error if the current user and the ownership of the directory are different.

ref https://github.blog/2022-04-12-git-security-vulnerability-announced/

The most effective way to protect against this vulnerability is to upgrade to Git v2.35.2. This version changes Git's behavior when looking for a top-level .git directory to stop when its directory traversal changes ownership from the current user. directory configuration).

According to actions/checkout#760, this problem affects if running GH Action in Docker.

rbs project was using git commands in the test, so it was an error.

Copy link
Member

@pocke pocke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@pocke pocke merged commit b82dbeb into ruby:master May 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

CI failed by unsafe repository
2 participants