Reputation: 1
I changed my operating system to Linux Mint. In doing that I migrated local git repositories data to an external drive and then moved back the files again into the new OS. Now when I try to perform any git command onto those git repos I get an error :
fatal: detected dubious ownership in repository at '/home/vrd/Documents/JUET/VIII Semester/Major-2/Applify' To add an exception for this directory, call:
git config --global --add safe.directory '/home/vrd/Documents/JUET/VIII Semester/Major-2/Applify'
Here 'Applify' is the git repository.
Using
ls -l /home/vrd/Documents/JUET/VIII\ Semester/Major-2/Applify
I found out the current ownership of the repository and it is the root user and the root group. So, I tried prefixing all git commands using sudo, and voila they were working.
Therefore, I tried to change the ownership by running:
sudo chown -R vrd:vrd /home/vrd/Documents/JUET/VIII\ Semester/Major-2/Applify
This also did not work. I am a bit new to the file structure and don't know in which directory to open the terminal and what should be the file path while running the commands. Tried a bunch of combinations, but they didn't work as well. Some help would be appreciated.
Upvotes: 0
Views: 313