1、gem安裝出現下面錯誤
root@ubuntu:/home/git/gitlab# sudo gem install bundler --no-ri --no-rdoc
ERROR: Could not find a valid gem ‘bundler‘ (>= 0), here is why:
Unable to download data from https://rubygems.org/ - Errno::ETIMEDOUT: Connection timed out - connect(2) (https://api.rubygems.org/latest_specs.4.8.gz)
解決辦法:
sudo gem install --http-proxy http://代理伺服器:端口 bundler --no-ri --no-rdoc
問題原因:内網是使用代理上網,需要設定gem使用代理
2、無法使用git擷取項目,需要為git配置代理
解決辦法:代理伺服器為 http 代理
1.HTTP 協定配置(配置 ~/.gitconfig)
3、apt-get 代理設定
sudo apt-get -c ~/apt_proxy.conf
配置檔案的格式,如下:
Acquire::http::proxy "http://your_proxy_adress1:端口号/";
Acquire::ftp::proxy "ftp://your_proxy_adress2:端口号/";
Acquire::https::proxy "https://your_proxy_adress3:端口号/";
4、fetch配置