I created a Git Manager script and am sending a webhook request. However, it gives the error "git config --global --add safe.directory /www/wwwroot/panel.mx.net.tr". When I run git pull origin main or the created shell script file from the ssh terminal, it does a githup pull.
#Code
echo $(date)
cd /www/wwwroot/webpath
git config --global --add safe.directory /www/wwwroot/webpath
git pull origin main
echo "🚀 Application deployed!"
echo ""
#OUTPUT
`=============Execution START==============
time: 2025-11-15 12:19:13
site: website_address
path: /www/wwwroot/webpath
branch: main
Git deployment script: pull_main
-----STDOUT-----
Sat Nov 15 12:19:13 PM +03 2025
🚀 Application deployed!
-----STDERR-----
fatal: $HOME not set
fatal: detected dubious ownership in repository at '/www/webpath'
To add an exception for this directory, call:
git config --global --add safe.directory /www/wwwroot/webpath
=============Execution END================`