I've installed the Squid through Docker and tested with curl and browser, it works fine!

And then I'm going to set the Http proxy to git, the below is my command:

git config --global http.proxy http://myserverip:3128

And then, here is the result of the above command in the git config.

$ cat ~/.gitconfig
    proxy = http://squid.veronalabs.com:3128
    sslVerify = false

But the git clone doesn't work!

$ git clone git@gitlab.com:repo/project.git
Cloning into 'panel'...
ssh: connect to host gitlab.com port 22: Connection timed out
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

And anyway, I've added this proxy for outgoing connections:

$ export http_proxy=http://myserverip:3128
$ export https_proxy=http://myserverip:3128

I really appreciate any helps!

1 Answer 1


You are using http.proxy but trying to clone the repository with SSH. you should use the https GitLab link.

  • Hum, It's reasonable! here is the result of Http method. fatal: unable to access 'https://gitlab.com/repo/project.git/': Received HTTP code 403 from proxy after CONNECT Mar 7, 2020 at 10:13
  • code 403 is forbidden, so maybe you should talk to your squid administrator ;-) Mar 7, 2020 at 10:30
  • I figured out, used another image, worked fine. hub.docker.com/r/babim/squid Mar 7, 2020 at 12:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.