Note: while the use-case described is about using submodules within a project, the same applies to a normal git clone
of a repository over HTTP.
I have
For me what it worked was:
sudo apt-get install socat
Create a file inside your $BIN_PATH/gitproxy with:
#!/bin/sh
_proxy=192.168.192.1
_proxyport=3128
exec socat STDIO PROXY:$_proxy:$1:$2,proxyport=$_proxyport
Dont forget to give it execution permissions
chmod a+x gitproxy
Run following commands to setup environment:
export PATH=$BIN_PATH:$PATH
git config --global core.gitproxy gitproxy