-
Notifications
You must be signed in to change notification settings - Fork 285
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
Safe Directory not working as expected #592
Comments
There is additional odd behavior that was observed while troubleshooting: Removing the "safe_directory" directive in the above example (such as by prefixing a
|
We have the exact same issue since a couple of weeks. We are using vcsrepo version v5.0.0 on Debian 11.6, using git version 2.39.2. |
The "safe directory" functionality created many problems and I removed it. The solution to my problem was deleting the git directory and recreating it through puppet. I use the "user" parameter to checkout as a non-root user. Here is an example that works for me (after deleting the git directory on the host): |
I get this issue without using the safe directory functionality at all. I have no idea why this now triggers. All I know now, after some debugging, is that at this point provider.exists is false: puppetlabs-vcsrepo/lib/puppet/type/vcsrepo.rb Line 133 in 0c7d183
I'll try to debug it some more, but I'm not that familiar with the ruby syntax. |
Anyone got a fix for this? |
After some debugging we realized that the issue was comming a wrong syntax in /etc/gitconfig (in case this helps others) |
Describe the Bug
The error "Path [...] exists and is not the desired repository" appeared in my puppet logs on a previously-working manifest for the installation of Dokuwiki. That resource is shown here:
https://github.com/jjarokergc/puppet-dokuwiki/blob/61c04b113525a3a10ac3b6c1d91eaa37df36531c/manifests/init.pp#L63
This error appeared after updating git to version 2.25.1 on Ubuntu, which backported the CVE-2022-24765 bug fix, introducing this failure. I followed the discussion and suggestions shown in Issue #535 and added the
safe_directory
parameter in the above example. I would appreciate any suggestions on how to get this module working again.Expected Behavior
I was expecting the git update to proceed as before but the "change from 'absent' to 'present' failed" problem persists.
Environment
lsb_release -a
On client: puppet agent --version
7.23.0
On master: puppetserver --version
puppetserver version: 7.9.5
Puppetfile.r10k
mod 'puppetlabs-vcsrepo', '5.4.0'
Additional Context
puppet agent -t --debug
The text was updated successfully, but these errors were encountered: