Skip to content
This repository has been archived by the owner on Dec 5, 2022. It is now read-only.

Fix for git version >=2.35.2: Add the current dir as a git safe dir #37

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bryant1410
Copy link

@bryant1410 bryant1410 commented May 31, 2022

From git 2.35.2, the repository needs to be owned by the current user. See https://github.blog/2022-04-12-git-security-vulnerability-announced/

This occurs because this runs inside Docker with a root user, while the directory is owned by another user (1001 in my case).

Without this, after doing git init, any git command on the repo can either output:

fatal: not in a git directory

or:

fatal: unsafe repository

@ztl8702
Copy link

ztl8702 commented Jun 9, 2022

+1, I am currently affected (failed build), thanks @bryant1410 for the fix.

Dear maintainer, can you please merge this PR, thanks! @maxheld83

@ztl8702
Copy link

ztl8702 commented Jun 9, 2022

@bryant1410 I tried using your branch, but got this error instead:

fatal: could not read Password for 'https://***@github.com': No such device or address

build log: https://github.com/zingzeu/yngping-spec/runs/6813352579?check_suite_focus=true

My workflow config: https://github.com/zingzeu/yngping-spec/blob/edb6eb9ebd6237a9254bd80cf13c69e65bf5a95a/.github/workflows/deploy.yml#L25-L30

Do you have any idea what might have been wrong?

@bryant1410
Copy link
Author

bryant1410 commented Jun 9, 2022

No idea. I'm using my branch in a repo: https://github.com/bryant1410/resume/blob/4b15222/.github/workflows/deploy.yml#L22

@ztl8702
Copy link

ztl8702 commented Jun 11, 2022

I switched to using https://github.com/marketplace/actions/deploy-to-github-pages instead

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants