curl não baixar os arquivos desejados

0

Não consigo fazer o download do script básico do GitLab. Embora eu possa abrir o link no navegador.

Como posso resolver isso?

[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

É um problema relacionado à rede?

Editar:

[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

Editar-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 ~]#

Editar-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

Editar-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 ~]#
    
por Muneeb Ali 31.08.2018 / 10:09

2 respostas

1

Bem, o problema identificado estava relacionado ao MSS / MTU. Eu precisava ajustar o valor de mss para 1452 no roteador para corrigir isso. Todos os usuários / servidores não têm esse problema agora.

    
por 04.09.2018 / 12:56
0

O ponto é que o Gitlab não suporta sslv2 e sslv3 anymoe (Consulte o verificador Qualys SSL relatório do Gitlab em Configuração > Protocolos). Sua versão do curl, openssl e wget tenta se conectar ao servidor com protocolos desatualizados.

No caso de curl , você pode forçar o cliente a usar o TLS. Experimente as seguintes opções:

--tlsv1
--tlsv1.1
--tlsv1.2
--sslv2 # this will not work on Gitlab
--sslv3 # this will not work on Gitlab

Eu assumo que seu sistema operacional é antigo ou desatualizado. Você deve atualizar seu sistema.

    
por 31.08.2018 / 12:25

Tags