Using Debian 9 Stretch server, Windows 7 Pro workstation, Git Extensions to handle GIT.
I have a git user using key to login to server.
When I push commit to server I get this error
C:\winprg\Git\bin\git.exe push --recurse-submodules=on-demand --progress "sites" refs/heads/fix_commit:refs/heads/fix_commit
Counting objects: 4, done.
Delta compression using up to 4 threads.
Total 4 (delta 3), reused 0 (delta 0)
error: unable to unlink old 'commit/config.php': Permission denied
To ssh://192.168.1.1/srv/git/sites.git
! [remote rejected] fix_commit -> fix_commit (Could not update working tree to new HEAD)
error: failed to push some refs to 'ssh://git@192.168.1.1/srv/git/sites.git'
I store git repo in: /srv/git/sites.git All files under /srv/git/sites.git has owner git:git.
I store webserver content on path: /srv/sites/mysite/htdocs All files under /srv/sites/mysite/htdocs has owner www-data:www-data.
git user is member of www-data group.
www-data user is member of git group.
Still having permission problem.
EDIT1: also when doing checkout in commandline, I get :
git@site:/srv/git/sites.git$ git checkout -f fix_commit
error: unable to unlink old 'commit/config.php': Permission denied
How do I fix it?