I was able to redirect std err output stream to a file in order to see the error. On my desktop I could not see the error because there it was working fine.
The problem was about dubious ownership of the GIT-repo.
The repo is on a shared drive. I cloned it from our remote repo. As the repo is originally created on another machine, it raised the error as far as I understand this issue.
In order to make it possible for the EasyMorph Server NT AUTHORITY/LOCAL SERVICE to execute the git command, I had to execute the following command on the machine which hosts the EM-server application.
git config --system --add safe.directory '%(prefix)///path_to_my_network_drive'
The suggested command by GIT i.e. the same command as above but with the --global flag instead of --system was not enough to resolve the problem.