Skip to content

Conversation

@MisterDA
Copy link
Contributor

@MisterDA MisterDA commented Sep 1, 2022

Mitigations added for CVE-2022-24765 cause error messages as the owner
of the git checkout won't be correct. It simply doesn't matter on a CI
system, so just add the directory to safe.directory to ignore it.

cc @dra27

run "git config --global user.email %S && git config --global user.name %S && git config --system core.longpaths true" email name
run "git config --global user.email %S && \
git config --global user.name %S && \
git config --global core.longpaths true && \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that the user doesn't have the permissions to set directives system-wide, so I also fixed core.longpaths to --global. By default, cygwin's git is used.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it possible to do this earlier in a step as ContainerAdministrator?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I re-tested and must have misread, the --system switch for core.longpaths worked as expected, both for Cygwin's git and Git for Windows. Reverting that change.
As a side note, the user is always Container Administrator. I haven't created another user.

Mitigations added for CVE-2022-24765 cause error messages as the owner
of the git checkout won't be correct. It simply doesn't matter on a CI
system, so just add the directory to safe.directory to ignore it.
@tmcgilchrist tmcgilchrist merged commit 51e298f into ocurrent:master Sep 19, 2022
@MisterDA MisterDA deleted the fix-git-windows branch September 19, 2022 16:16
@MisterDA MisterDA mentioned this pull request Sep 20, 2022
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 this pull request may close these issues.

3 participants