-
Notifications
You must be signed in to change notification settings - Fork 26
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
Add git safe.directory
support
#70
Conversation
LGTM but don't know if this will not break anything in local/ssh runners? |
What could potentially break? Btw, I noticed I am not the only one running into this issue though some might handle it silently: https://codeberg.org/forgejo/forgejo/src/branch/forgejo/.woodpecker/testing-amd64.yml#L53 |
When multiple jobs run on the same host in parallel one will override others safedir. |
Maybe this could be changed to set the default safe directory only if it's not already set? |
@lafriks if it's not global set there is no race condition or change in the host config |
Yes, I did not notice that global is gone already ;) |
Is there anything left or is this ready to merge? :) |
@6543 this will now conflict for parallel jobs on local/ssh instances |
it should not ... as git global config change should not create race conditions ... |
why not? as commands are run sequentially and if two pipelines are run at the same time it could be:
so there is a chance that only workspace2 pipeline will succeed |
Afaik |
I'm for --add if it exist to be explicite |
As this is needed only for local/ssh I think it should be preconfigured to have safedir where all workspace directories will be created. It would be enough to check if safedir is set as parent dir for current workspace than not set it |
🎉 This PR is included in version 2.1.0 🎉 The release is now available [here]([object Object]) Thank you for your contribution. ❤️📦🚀 |
fix #63
git config safe.directory
$CI_WORKSPACE
but can be adjusted via env varPLUGIN_SAFE_DIRECTORY
Works for me with image
pats22/plugin-git:2.0.13
(based onplugin-git:2.0.3
)