Gitserver代理上网安装出现故障的几个解决的方法。

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://代理server:port bundler --no-ri --no-rdoc

问题原因:内网是使用代理上网。须要设置gem使用代理


2、无法使用git获取项目。须要为git配置代理

解决的方法:代理server为 http 代理

1.HTTP 协议配置(配置 ~/.gitconfig)

[http]
proxy = http://10.22.0.4:8080

3、apt-get 代理设置 

sudo apt-get -c ~/apt_proxy.conf 
配置文件的格式,例如以下: 
Acquire::http::proxy "http://your_proxy_adress1:port号/"; 
Acquire::ftp::proxy "ftp://your_proxy_adress2:port号/"; 
Acquire::https::proxy "https://your_proxy_adress3:port号/"; 


4、fetch配置





猜你喜欢

转载自www.cnblogs.com/xfgnongmin/p/10726373.html
今日推荐