You are not logged in.

#1 2018-07-17 06:11:34

vabc3
Member
Registered: 2009-06-29
Posts: 7

Upgrading curl 7.60.0-1 to 7.61.0-1 breaks git https clone

Experiencing git https clone failure with username/password auth.

After taking a look:
GIT_CURL_VERBOSE=1 git clone https://xxx
fatal: Authentication failed for https://xxx

It appears 'Authorization' header does not show up in the request git send to server.

By manually reverting to 7.60.0-1 can solve the issue.

Offline

#2 2018-07-17 08:23:43

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,718
Website

Re: Upgrading curl 7.60.0-1 to 7.61.0-1 breaks git https clone

Works here. Is that the entirity of the output?

$ curl --version
curl 7.61.0 (x86_64-pc-linux-gnu) libcurl/7.61.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.32.0
Release-Date: 2018-07-11
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL
$ git --version
git version 2.18.0
$ GIT_CURL_VERBOSE=1 git clone https://git.website.com/wormzy/gitlab.git 
Cloning into 'gitlab'...
* Couldn't find host git.website.com in the .netrc file; using defaults
*   Trying 123.123.123.123...
* TCP_NODELAY set
* Connected to git.website.com (123.123.123.123) port 443 (#0)
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using TLSv1.2 / ECDHE-RSA-AES256-GCM-SHA384
* ALPN, server accepted to use http/1.1
* Server certificate:
*  subject: C=GB; ST=City of Edinburgh; L=EDINBURGH; O=My Workplace; OU=ECDF; CN=git.website.com
*  start date: Jan 23 12:32:31 2018 GMT
*  expire date: Jan 23 12:43:00 2021 GMT
*  subjectAltName: host "git.website.com" matched cert's "git.website.com"
*  issuer: C=BM; O=QuoVadis Limited; CN=QuoVadis Global SSL ICA G3
*  SSL certificate verify ok.
> GET /wormzy/gitlab.git/info/refs?service=git-upload-pack HTTP/1.1
Host: git.website.com
User-Agent: git/2.18.0
Accept: */*
Accept-Encoding: deflate, gzip
Accept-Language: en-GB, *;q=0.9
Pragma: no-cache

< HTTP/1.1 401 Unauthorized
< Server: nginx
< Date: Tue, 17 Jul 2018 08:15:23 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 26
< Connection: keep-alive
< Cache-Control: no-cache
< WWW-Authenticate: Basic realm="GitLab"
< X-Content-Type-Options: nosniff
< X-Frame-Options: DENY
< X-Request-Id: ffd455d5-245f-4bff-ba27-4db552962237
< X-Runtime: 0.081117
< X-Ua-Compatible: IE=edge
< X-Xss-Protection: 1; mode=block
< 
* Connection #0 to host git.website.com left intact
Username for 'https://git.website.com': 

Mod not: Not a pacman issue, moving to NC.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2018-07-17 21:53:54

vabc3
Member
Registered: 2009-06-29
Posts: 7

Re: Upgrading curl 7.60.0-1 to 7.61.0-1 breaks git https clone

Have you tried to input username and password then? After that 'Authentication' header would not be fired and the request would always be denied.

Offline

#4 2018-07-17 21:59:16

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,718
Website

Re: Upgrading curl 7.60.0-1 to 7.61.0-1 breaks git https clone

Yep, clone worked as normal after the authentication prompt.

Do you have access to the remote host? Can you check the logs?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#5 2018-07-18 02:59:06

vabc3
Member
Registered: 2009-06-29
Posts: 7

Re: Upgrading curl 7.60.0-1 to 7.61.0-1 breaks git https clone

I can connect successfully with curl 7.60.0-1, only fails with 7.61.0-1

As you can see, 'Authorization: Basic <base64value>' is missing with libcurl 7.61.0-1

Attached log:

git version:
git version 2.18.0

curl version:
(workable)
curl 7.60.0 (x86_64-pc-linux-gnu) libcurl/7.60.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.32.0
Release-Date: 2018-05-16

Success log:
* Re-using existing connection! (#0) with host <githost>
* Connected to <githost> (<hostip> port 443 (#0)
* Server auth using Basic with user '<username>'
> GET <path>/refs?service=git-upload-pack HTTP/1.1
Host: <githost>
Authorization: Basic <base64value>
User-Agent: git/2.18.0
Accept: */*
Accept-Encoding: deflate, gzip
Accept-Language: en-US, *;q=0.9
Pragma: no-cache

< HTTP/1.1 200 OK
< Cache-Control: private
< Content-Length: 296
< Content-Type: application/x-git-upload-pack-advertisement

(non-workable)
curl 7.61.0 (x86_64-pc-linux-gnu) libcurl/7.61.0 OpenSSL/1.1.0h zlib/1.2.11 libidn2/2.0.5 libpsl/0.20.2 (+libidn2/2.0.4) nghttp2/1.32.0
Release-Date: 2018-07-11

Failure log:
* Re-using existing connection! (#0) with host <githost>
* Connected to <githost> (<hostip> port 443 (#0)
> GET <path>/refs?service=git-upload-pack HTTP/1.1
Host: <githost>
User-Agent: git/2.18.0
Accept: */*
Accept-Encoding: deflate, gzip
Accept-Language: en-US, *;q=0.9
Pragma: no-cache

< HTTP/1.1 401 Unauthorized
< Cache-Control: private
< Content-Length: 8354
< Content-Type: text/html; charset=utf-8

Offline

Board footer

Powered by FluxBB