Received HTTP code 400 from proxy after CONNECT

I am trying to clone a Github repo but getting below proxy error on Mac Pro.

I have not configured any proxy server.

fatal: unable to access 'https://github.com/xxx/xxx.git/': Received HTTP code 400 from proxy after CONNECT

To solve this issue, I had to reset all configurations as below:

git config --global --unset http.proxy
git config --global --unset https.proxy
git config --global --unset core.gitproxy

//check config details after reset
git config -l --show-origin|grep -I proxy