Can't clone or pull due to a git outbound proxy

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

When using Git via command line to push or pull, the following strange output is shown (note that the host.company.com will not match the repo you are trying to clone and the port may be different):

fatal: unable to access 'http://user@host.company.com:7990/scm/en/repo.git/': Failed connect to host.company.com:8080; No error

診断

Checkout the Git output after setting it up to debug using this document: Debug logging for Git operations on the client.

原因

Your Git is configured to use an outbound proxy that has issues to reach Bitbucket Server. 

ソリューション

You could either:

  • Fix your proxy if you need it to get to Bitbucket Server or;
  • Bypass your proxy and connect to Bitbucket Server directly. Check your Git outbound proxy configuration and unset it:

 

# Get system value
$ git config --system --get https.proxy
$ git config --system --get http.proxy

# Get global value
$ git config --global --get https.proxy
$ git config --global --get http.proxy

# Check configuration for your user
$ cat $HOME/.gitconfig

# Unset system value
$ git config --system --unset https.proxy
$ git config --system --unset http.proxy

# Unset global value
$ git config --system --unset https.proxy
$ git config --system --unset http.proxy

 

  • Your proxy could also be set as an environment variable. Check if your environment has any of the env variables http_proxy or https_proxy set up and unset them. Examples of how to set up:

# Linux
export http_proxy=http://proxy:8080
export https_proxy=https://proxy:8443 

# Windows
set http_proxy http://proxy:8080 
set https_proxy http://proxy:8080
最終更新日 2016 年 4 月 6 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.