遠(yuǎn)程調(diào)用下載文件直接用wget http就可以屋群,一般文件路徑類型是http。如果有遇到是https就會(huì)下載出錯(cuò)坏挠。
例如:
[root@localhost jenkins]# sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
-bash: udo: command not found
[root@localhost jenkins]# sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
--2019-11-29 20:48:39-- https://pkg.jenkins.io/redhat-stable/jenkins.repo
Resolving pkg.jenkins.io (pkg.jenkins.io)... 52.202.51.185
Connecting to pkg.jenkins.io (pkg.jenkins.io)|52.202.51.185|:443... connected.
ERROR: cannot verify pkg.jenkins.io's certificate, issued by ‘/C=US/ST=VeriSign, Inc./L=VeriSign Trust Network/O=Terms of use at https://www.verisign.com/rpa/OU=Terms of use at https://www.verisign.com/rpa/CN=VeriSign Class 1 Extended Validation CA’:
Unable to locally verify the issuer's authority.
To connect to pkg.jenkins.io insecurely, use `--no-check-certificate'.
只需要在wget后面加上--no-check-certificate就可以芍躏,需要一個(gè)認(rèn)證下載指令而已。
即:sudo wget --no-check-certificate -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo