-
-
Notifications
You must be signed in to change notification settings - Fork 102
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
windocker: Merge or otherwise mitigate "dubious ownership" remediation #3713
Comments
The attempt to use
If I issue that immediately after adding a safe.directory parameter with git config then it shows the correct value so it's using a git configuration from elsewhere at that point. If I move it out of the way then it fails earlier in the pipeline:
So for now it seems that this gitconfig file, and whatever it's using when I explicitly add in the safe.directory setting, are both required, so I'll leave both in place. Note that before I set the |
The current jobs are failing to remove some of the files after the build. Suspect they're being extracted via the host system and then deletion is attempted in the container which is failing:
|
I have not yet been able to identify 100% when the scenario occurs, but I've seen it in two places. One on the host system, and one just before the
git clean -fdx
operation in the pipelines.I suspect the problems we're seeing are caused by the Windows SID (User ID) on the host and container being different which causes git to think the directories and files are owned by someone else. This can be mitigated by a
.gitconfig
file which is stored in the location pointed to by theHOME
environment variable (CurrentlyC:\jw
which is volume mounted inside the build containers):This was not always working when I had it set to a more specific location such as
/cygwin64/c/jw/workspace/build-scripts/jdk21u/windbld
hence the current use of the*
wildcard.Note that this still does not appear to be working in all situations - potentially when a new docker images is created and a new SID is defined which affects the ownership of the
.gitconfig
itself, but this is just speculation and requires further investigation.The
.gitconfig
change is not always working, so I have been running thewindbld
job from a pipelines branch that has agit config
change to add the directory explicitly before thegit clean -fdx
, although I've also seen the same error earlier in the process (while it us doing work on the workspace on the host before the docker container).The text was updated successfully, but these errors were encountered: