fatal: detected dubious ownership in repository at '/storage/emulated/0/<some_folder>'
To add an exception for this directory, call:
git config --global --add safe.directory /storage/emulated/0/<some_folder>
This is a simple check (by Git) comparing current user ID and the ID of the owner of the current folder. If they do not match (in case of rootless Termux, root owns them all.), Git will not permit any action (even git status
).
Warning Please do not use this workaround on shared devices. Your work may end up with malicious software.
It will suppress Git security check by trusting all the directories. You can check the status of your safe directories by git config --global --list
🕊️ Solution In your terminal:
git config --global --add safe.directory '*'