I use the following command to set the proxy
$ git config --global git.proxy http://127.0.0.1:1080
$ git config --global http.proxy http://127.0.0.1:1080
$ git config --global https.proxy http://127.0.0.1:1080
But when I clone a repo, such as
# git clone git@github.com:npm/npm.git
It doesn't use the proxy to clone.
I try to change my proxy address, it is random address.
$ git config --global git.proxy asdfi:sidfw:sfd
$ git config --global http.proxy asdfi:sidfw:sfd
$ git config --global https.proxy asdfi:sidfw:sfd
If the proxy work, git should prompt some error. But when I clone again,it didn't prompt any error
$ git clone git@github.com:s97712/protobuf.js.git
Cloning into 'protobuf.js'...
Enter passphrase for key '/home/s97712/.ssh/id_rsa':
remote: Enumerating objects: 1, done.
remote: Counting objects: 100% (1/1), done.
Receiving objects: 2% (363/18110), 60.00 KiB | 5.00 KiB/s
That mean the git proxy does'nt work.
I also tried to use the environment variable
$ export http_proxy="http://localhost:1080"
$ export https_proxy="http://localhost:1080"
But it still not work.