Question
· Jan 2

dubious ownership in repository

We are trying to use Git for Source Code control in our existing application. Currently all Source Control is a manual process. We are running IRIS on a Windows server. The git extension has been installed and initial configuration done. We do get the git tab in Studio. We keep getting the following error:

Git Status:
fatal: detected dubious ownership in repository at 'C:/KBS/dev/server/db'
'C:/KBS/dev/server/db' is owned by:
'S-1-1-0'
but the current user is:
'S-1-5-18'
To add an exception for this directory, call: git config --global --add safe.directory C:/KBS/dev/server/db.

Tried [ git config --global --add safe.directory C:/KBS/dev/server/db ] in git bash with and without quotes. No change.

Tried [ git config --global --add safe.directory "*" ] single and double quotes in git bash with and without double quotes. No change.

Tried changing the owner of the folder in Windows, but cannot find 'S-1-5-18' as a user in Windows.

Most of our attempts have been in git or Windows with no affect. We suspect there is something in IRIS that we need to do as we are trying to use git source control within IRIS. Using it in git bash only lets us put IRIS.DAT into the repository. Which is not very helpful.

Product version: IRIS 2022.1
$ZV: IRIS for Windows (x86-64) 2022.1 (Build 209U) Tue May 31 2022 12:16:40 EDT
Discussion (12)4
Log in or sign up to continue

In the Git plugin, a  %Studio.SourceControl.Base subclass , I get the active branch
Set Active=##class(Git.Utils).GetActiveBranch(Repos.Directory)
If Active["fatal" {
Set sc=##class(Git.Utils).AddToSaveList(Repos.Name)
}
If that gets a fatal I call:
Set Command="cd "_Repository.Directory_" && git config --global --add safe.directory "_Dir
Set sc=..CPipe(Command,.Output)

This process runs under the Studio account

@Alan Watts - there is no client-side Git plugin for Studio.  Studio works exclusively with server-side source-control hooks.  This is what the git-source-control package on OEX is ... it is server-side source control hooks to allow multiple developers to properly interact with a git repo from a single Namespace within InterSystems IRIS.  So once this is properly installed and configured for a given Namespace, once you connect via Studio you should see new top level Menu items in Studio and all changes will be governed by the source control hooks.  Nothing else is needed to be installed on the developers' Studio instances in terms of plug-ins, etc.

Assuming this is with git-source-control, the approach would be to have the temp folder *and all subfolders* owned by SYSTEM (in this case), as discussed at https://github.com/intersystems/git-source-control?tab=readme-ov-file#du.... This is under folder Properties > Security > Advanced. Click "Change" next to "Owner", and under Object Names to Select type in "SYSTEM". Before applying, check the box with "Replace all child object permission entries..." at the bottom of the dialog. That should do it.