• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

设置 proxy

武飞扬头像
yaoxinJJJ
帮助1

Git proxy

In .gitconfig

[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

Install rust failed on SSL certificates

I try to install with the simplest way:

$ curl https://sh.rustup.rs -sSf | sh

and it ends with:

info: syncing channel updates for 'stable-x86_64-unknown-linux-gnu'
error: could not download file from 'https://static.rust-lang.org/dist/channel-rust-stable.toml.sha256' to '/home/ildar/.rustup/tmp/smpm6z49tivc6git_file
info: caused by: error during download
info: caused by: [60] Peer certificate cannot be authenticated with given CA certificates (SSL certificate problem: unable to get local issuer certificate)
rustup: command failed: /tmp/.private/ildar/tmp.8kVhcIBdVQ/rustup-init

Solution: add correct certificates in /usr/local/share/ca-certificates/ , then sudo update-ca-certificates
学新通

sudo kubeadm config images pull get stocked

sudo kubeadm config images pul
[sudo] password for yaoxin: 
W0920 15:40:27.559827   94042 version.go:104] could not fetch a Kubernetes version from the internet: unable to get URL "https://dl.k8s.io/release/stable-1.txt": Get "https://dl.k8s.io/release/stable-1.txt": context deadline exceeded (Client.Timeout exceeded while awaiting headers)
W0920 15:40:27.559935   94042 version.go:105] falling back to the local client version: v1.25.1
failed to pull image "registry.k8s.io/kube-apiserver:v1.25.1": output: E0920 15:42:57.731385   94238 remote_image.go:242] "PullImage from image service failed" err="rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.25.1\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.25.1\": failed to do request: Head \"https://registry.k8s.io/v2/kube-apiserver/manifests/v1.25.1\": dial tcp 34.107.244.51:443: i/o timeout" image="registry.k8s.io/kube-apiserver:v1.25.1"
time="2022-09-20T15:42:57 02:00" level=fatal msg="pulling image: rpc error: code = Unknown desc = failed to pull and unpack image \"registry.k8s.io/kube-apiserver:v1.25.1\": failed to resolve reference \"registry.k8s.io/kube-apiserver:v1.25.1\": failed to do request: Head \"https://registry.k8s.io/v2/kube-apiserver/manifests/v1.25.1\": dial tcp 34.107.244.51:443: i/o timeout"
, error: exit status 1
To see the stack trace of this error execute with --v=5 or higher

solution

yaoxin@master:~$ sudo systemctl set-environment HTTP_PROXY=10.206.133.47:3128
yaoxin@master:~$ sudo systemctl set-environment HTTPS_PROXY=10.206.133.47:3128
yaoxin@master:~$ sudo systemctl restart containerd.service

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhgbicib
系列文章
更多 icon
同类精品
更多 icon
继续加载