Git failded with fatal error. fata: detected ownership in repository at <path> in git
Prem Murmu
on
2/19/2023 3:48:44 PM
Git failded with fatal error. fata: detected ownership in repository at 'c:/workdirectory/ projects/repos/edemo' 'C:/workdirectory/ projects/repos/edemo' is owned by: 's-1-5-21-2021243588-4293919169-3387299209-8806270' but the current user is: 's-1-5-21-4255815394-2214699486-701957579-500'
To add add an exception for this directory, call:
git config --global --add safe.directory c:/workdirectory/ projects/repos/edemo
Solutions:
For windows use below command:
takeown /f <project path> /r /d y
Like: takeown /f "C:/workdirectory/projects/repos/edemo" /r /d y
For Linux use below command:
chown -R username:group <path to the repository>
Next make or add the directory to the safe directory list by below git command:
git config --global --add safe.directory <project path>
Like:- git config --global --add safe.directory c:/workdirectory/ projects/repos/edemo
0 Comments on this post
Comments(0)||Login to Comments
- see more..
Categories
ALLAsp.Net (3)
Sitecore (11)
Issues Resolved (9)
Sitecore 9.3 (2)
International Business (1)
Innovations in Industries (3)
Supply Chain Management (1)
Industrial Engineering (14)
Sitecore 10 (4)
Sharepoint (1)
Azure (4)
Cloud Computing (1)
Online Courses (1)
Online Resources (2)
C# (1)
Blazor WebAssembly (2)
Sitecore form (1)
MS Sql Server (1)
Angular 11 (2)
Automobile Engineering (5)
Sitecore powershell (1)
Devops (2)
Microservice Architecture (1)
Sitecore Interview Questions (2)
Dotnet interview questions (1)
Sitecore useful links (1)
Privacy&Cookies (2)
Solr Search (2)
JavaScript (1)
sitecore xm cloud (2)