# ERROR: Error fetching remote repo 'origin'

**URL:** <https://community.jenkins.io/t/error-error-fetching-remote-repo-origin/7304>\
**Category:** Using Jenkins\
**Tags:** question\
**Created:** [May 10, 2023, 9:41pm UTC](https://community.jenkins.io/t/error-error-fetching-remote-repo-origin/7304 "2023-05-10T21:41:53Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [May 10, 2023, 10:01pm UTC](https://community.jenkins.io/t/error-error-fetching-remote-repo-origin/7304/2 "2023-05-10T22:01:09Z")

</div>

Hi there,

Command line git included in recent container images includes a fix for a [security issue](https://security-tracker.debian.org/tracker/CVE-2022-24765). Command line git now refuses to perform operations in repositories when the directory is not owned by the current user.

[JENKINS-70540](https://issues.jenkins.io/browse/JENKINS-70540) includes a set of steps that show how to duplicate the issue. In that issue report, it is noted:

> Command line git has decided that it is dangerous to perform git operations in a directory owned by a different user. I may consider a way to better detect it and better alert the administrator that there is a problem, but ultimately it is a mistake to perform git operations in a directory owned by a different user without intentionally configuring the safe.directory to allow it.

The preferred alternative is to fix the permissions on the directories so that they are owned by the user that is calling command line git.

A description of command line git [CVE-2022-24765](https://nvd.nist.gov/vuln/detail/cve-2022-24765) is available in a [GitHub blog post](https://github.blog/2022-04-12-git-security-vulnerability-announced/#cve-2022-24765). The [Red Hat description](https://access.redhat.com/security/cve/cve-2022-24765) is also quite helpful, as is the [Debian description](https://security-tracker.debian.org/tracker/CVE-2022-24765).

---

_[View the full topic](https://community.jenkins.io/t/error-error-fetching-remote-repo-origin/7304)._
