Foreman-plugin-templates / how to set a git proxy please?

Hello,
I’m trying to setup a template git syncronization using the foreman-plugin_template but need to set a proxy to access git through https. Problem, no documented in the manual and I encounter a problem when trying to it manually :

Problem:

sudo -u foreman git config --global https.proxy http://proxyaddress:3128

error: could not lock config file /usr/share/foreman/.gitconfig: Permission denied

ls -la /usr/share/foreman/.gitconfig

-rwxrwxrwx 1 foreman foreman 0 Jan 23 19:13 /usr/share/foreman/.gitconfig
Expected outcome:
What’s wrong please ?
Foreman and Proxy versions:
3.3
Foreman and Proxy plugin versions:
3.3
Distribution and version:
RHEL 8
Other relevant data:

Any help would be appreciated.
Regards