如何设置 proxy

如何设置 proxy,第1张

Git proxy
[http]
	proxy = http://10.206.133.47:3128
[user]
	email = name@email.com
	name = name
APT PROXY

In file /etc/apt/apt.conf

	Acquire::http::proxy "http://10.206.133.47:3128/";
	Acquire::https::proxy "http://10.206.133.47:3128/";
	Acquire::http::No-Cache=true;
	Acquire::https::No-Cache=true;
	Acquire::http::Pipeline-Depth '0';
PIP proxy

In file /root/.pip/pip.conf

[global]
index-url = http://pypi.douban.com/simple
proxy=http://10.206.133.47:3128
[install]
trusted-host=pypi.douban.com
设置 proxy时出现的各种错误
  • fatal: unable to access ‘https://github.com/spdk/spdk/’: server certificate verification failed. CAfile: none CRLfile: none
export GIT_SSL_NO_VERIFY=1 

git config --global http.sslVerify false

export http_proxy=http://10.206.133.47:3128
  • 第二个错误:该错误 是因为没有设置proxy
Looking in indexes: http://pypi.douban.com/simple
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) 
after connection broken by 'ConnectTimeoutError(<urllib3.connection.HTTPConnection 
object at 0x7faf6af6c700>, 'Connection to pypi.douban.com timed out. (connect timeout=15)')': /simple/fb-idb/
  • fatal: unable to access ‘https://github.com/spdk/spdk/’: server certificate verification failed. CAfile: none CRLfile: none

export GIT_SSL_NO_VERIFY=1 

git config --global http.sslVerify false

export http_proxy=http://10.206.133.47:3128

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/langs/873329.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-13
下一篇 2022-05-13

发表评论

登录后才能评论

评论列表(0条)

保存