我无法下载GitLab的bash脚本。不过,我可以在浏览器中打开链接。
我怎么才能解决这个问题?
[root@localhost ~]# curl https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- 0:00:39 --:--:-- 0是网络相关的问题吗?
编辑:
[root@localhost ~]# curl -v https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to packages.gitlab.com port 443 (#0)
* Trying 54.153.54.194...
* Connected to packages.gitlab.com (54.153.54.194) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
0 0 0 0 0 0 0 0 --:--:-- 0:02:00 --:--:-- 0* NSS error -5961 (PR_CONNECT_RESET_ERROR)
* TCP connection reset by peer
0 0 0 0 0 0 0 0 --:--:-- 0:02:01 --:--:-- 0
* Closing connection 0
curl: (35) TCP connection reset by peer编辑-2:
[root@localhost ~]# openssl s_client -connect packages.gitlab.com:443 -state -nbio
CONNECTED(00000003)
turning on non blocking io
SSL_connect:before/connect initialization
SSL_connect:SSLv2/v3 write client hello A
SSL_connect:error in SSLv2/v3 read server hello A
write R BLOCK
^C
[root@localhost ~]#编辑-3:
[root@localhost ~]# wget https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
--2018-08-31 06:09:29-- https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh
Resolving packages.gitlab.com (packages.gitlab.com)... 54.153.54.194
Connecting to packages.gitlab.com (packages.gitlab.com)|54.153.54.194|:443... connected.
^C
[root@localhost ~]# clock
Fri 31 Aug 2018 06:13:51 AM EDT -0.850009 seconds编辑-4:
[root@localhost ~]# curl -v --tlsv1 https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to packages.gitlab.com port 443 (#0)
* Trying 54.153.54.194...
* Connected to packages.gitlab.com (54.153.54.194) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
0 0 0 0 0 0 0 0 --:--:-- 0:02:00 --:--:-- 0* NSS error -5961 (PR_CONNECT_RESET_ERROR)
* TCP connection reset by peer
0 0 0 0 0 0 0 0 --:--:-- 0:02:01 --:--:-- 0
* Closing connection 0
curl: (35) TCP connection reset by peer
[root@localhost ~]# curl -v --tlsv1.1 https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to packages.gitlab.com port 443 (#0)
* Trying 54.153.54.194...
* Connected to packages.gitlab.com (54.153.54.194) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
0 0 0 0 0 0 0 0 --:--:-- 0:02:00 --:--:-- 0* NSS error -5961 (PR_CONNECT_RESET_ERROR)
* TCP connection reset by peer
0 0 0 0 0 0 0 0 --:--:-- 0:02:01 --:--:-- 0
* Closing connection 0
curl: (35) TCP connection reset by peer
[root@localhost ~]# curl -v --tlsv1.2 https://packages.gitlab.com/install/repositories/gitlab/gitlab-ee/script.rpm.sh | sudo bash
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* About to connect() to packages.gitlab.com port 443 (#0)
* Trying 54.153.54.194...
* Connected to packages.gitlab.com (54.153.54.194) port 443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* CAfile: /etc/pki/tls/certs/ca-bundle.crt
CApath: none
0 0 0 0 0 0 0 0 --:--:-- 0:02:00 --:--:-- 0* NSS error -5961 (PR_CONNECT_RESET_ERROR)
* TCP connection reset by peer
0 0 0 0 0 0 0 0 --:--:-- 0:02:01 --:--:-- 0
* Closing connection 0
curl: (35) TCP connection reset by peer
[root@localhost ~]#发布于 2018-09-04 10:56:43
所确定的问题与MSS/MTU有关。我需要在路由器上将mss值调整为1452来修复这个问题。现在所有的用户/服务器都没有这个问题。
发布于 2018-08-31 10:25:41
重点是Gitlab不支持sslv2和sslv3 anymoe (参见配置>协议下的Gitlab的Qualys检查器报告 )。您的curl、openssl和wget版本试图用过时的协议连接到服务器。
在发生curl的情况下,您可能会强迫客户端使用TLS。尝试以下选项:
--tlsv1
--tlsv1.1
--tlsv1.2
--sslv2 # this will not work on Gitlab
--sslv3 # this will not work on Gitlab我想你的操作系统是旧的还是过时的。你应该更新你的系统。
https://unix.stackexchange.com/questions/465954
复制相似问题