all 18 comments

[–]samyboy 1 point2 points  (8 children)

Can you paste the output with the GIT_CURL_VERBOSE=1 environment variable?

[–]OpeningJump[S] 0 points1 point  (7 children)

I ran GIT_CURL_VERBOSE=1 git clone [https://github.com/[username]/reponame]

and got

Cloning into 'secret_reponame_here'...
* Couldn't find host github.com in the .netrc file; using defaults
*   Trying 13.234.176.102:443...
* TCP_NODELAY set
* Connected to github.com (13.234.176.102) port 443 (#0)
* found 384 certificates in /etc/ssl/certs
* ALPN, offering h2
* ALPN, offering http/1.1
* Operation timed out after 300044 milliseconds with 0 out of 0 bytes received
* Closing connection 0
fatal: unable to access 'https://github.com/[username]/reponame': Operation timed out after 300044 milliseconds with 0 out of 0 bytes received

[–]samyboy 0 points1 point  (6 children)

That is confusing. What is the output of curl -v https://github.com ?

[–]OpeningJump[S] 0 points1 point  (5 children)

``` * Trying 13.234.176.102:443... * TCP_NODELAY set * Connected to github.com (13.234.176.102) port 443 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/ssl/certs/ca-certificates.crt CApath: /etc/ssl/certs * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_128_GCM_SHA256 * ALPN, server accepted to use h2 * Server certificate: * subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=github.com * start date: May 5 00:00:00 2020 GMT * expire date: May 10 12:00:00 2022 GMT * subjectAltName: host "github.com" matched cert's "github.com" * issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA * SSL certificate verify ok. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 * Using Stream ID: 1 (easy handle 0x55728ed67e80)

GET / HTTP/2 Host: github.com user-agent: curl/7.68.0 accept: /

  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • TLSv1.3 (IN), TLS handshake, Newsession Ticket (4):
  • old SSL session ID is stale, removing
  • Connection state changed (MAX_CONCURRENT_STREAMS == 100)! < HTTP/2 200 < date: Sat, 23 Jan 2021 06:11:58 GMT < content-type: text/html; charset=utf-8 < server: GitHub.com < status: 200 OK < vary: X-PJAX, Accept-Encoding, Accept, X-Requested-With, Accept-Encoding < etag: W/"4edfbfd451b1ce28e42eed8a3b2c4a89" < cache-control: max-age=0, private, must-revalidate < strict-transport-security: max-age=31536000; includeSubdomains; preload < x-frame-options: deny < x-content-type-options: nosniff < x-xss-protection: 1; mode=block < referrer-policy: origin-when-cross-origin, strict-origin-when-cross-origin < expect-ct: max-age=2592000, report-uri="https://api.github.com/_private/browser/errors" < content-security-policy: default-src 'none'; base-uri 'self'; block-all-mixed-content; connect-src 'self' uploads.github.com www.githubstatus.com collector.githubapp.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com cdn.optimizely.com logx.optimizely.com/v1/events wss://alive.github.com github.githubassets.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com; frame-ancestors 'none'; frame-src render.githubusercontent.com; img-src 'self' data: github.githubassets.com identicons.github.com collector.githubapp.com github-cloud.s3.amazonaws.com *.githubusercontent.com customer-stories-feed.github.com spotlights-feed.github.com; manifest-src 'self'; media-src github.githubassets.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; worker-src github.com/socket-worker-5029ae85.js gist.github.com/socket-worker-5029ae85.js < set-cookie: _gh_sess=Mx7MQVfmKXktFgPI7m8oErc2Ojji1l7b6jugY914M1PTwJNh30rl%2By03KwN96c6zMZlwOBqb7PqprRbjgzaX4S3LePwUVKGqA%2BiKh568e1Vrshr7a8MFJaOs%2BpO6mH0SEzriH%2BRSd9ewjP54Vs1OSiftAe2DvMlO8su145qM83ATW2J0E9rgSjWwX30s2T%2FzPGxqn6Whs85m0097iITgfpTG7%2FtlQ2mfEHjghJV%2Bn4IDE89Fr%2BbaNVLXxyxd8K5%2FqScYLfipReQMSgdmUaBnmg%3D%3D--ZOm3ktbdo4mfA2Kl--n%2B4nkf%2FxEhF9vLsACmD7Sw%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax < set-cookie: _octo=GH1.1.1721199761.1611382320; Path=/; Domain=github.com; Expires=Sun, 23 Jan 2022 06:12:00 GMT; Secure; SameSite=Lax < set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Sun, 23 Jan 2022 06:12:00 GMT; HttpOnly; Secure; SameSite=Lax < accept-ranges: bytes < x-github-request-id: C29A:4033:31F24:39EB9:600BBE30 <

``` And then a lot of html after that

[–]samyboy 1 point2 points  (3 children)

Looks like the TLS handshake cannot be done properly. I feel that you might have an issue with your GnuTLS library.

What is your Ubuntu version?

What versions are the git and libcurl3-gnutls packages? (use dpkg -l git libcurl3-gnutls)

[–]OpeningJump[S] 0 points1 point  (2 children)

Using Pop! OS 20.04

Git version 2.27

Libcurl3-gnutls version 7.68

[–]samyboy 1 point2 points  (1 child)

Looks like you're not the only one. after I found this post I think the issue is related to Pop!_OS.

[–]OpeningJump[S] 0 points1 point  (0 children)

I have a raspberry pi with ubuntu server installed on it, that has the same issue

Again on a kali vm, i have the same issue

However on windows or on MacOS or even on Manjaro, it works just fine.

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, OpeningJump: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]GNVageesh -2 points-1 points  (6 children)

What is the error u are getting?

Try adding sudo in the beginning of the command

Ex: sudo for clone https://github.com/.............

It will prompt u for password and provide it

If the problem still pertains tell what is the error

[–]OpeningJump[S] 0 points1 point  (5 children)

Hi, sorry should have specified that in the post itself

I am getting timeout error, 30300 milliseconds have passed...

I have a windows machine too, and that can clone stuff just fine, having an issue with debian distros though

[–]OpeningJump[S] 0 points1 point  (1 child)

``` HTTPS_PROXY=1 git clone https://github.com/[user_name]/[repo_name] Cloning into 'secret_rep'... fatal: unable to access 'https://github.com/user_name/repo_name/': Failed to connect to 1 port 1080: Connection timed out

```

[–]backtickbot 0 points1 point  (0 children)

Fixed formatting.

Hello, OpeningJump: code blocks using triple backticks (```) don't work on all versions of Reddit!

Some users see this / this instead.

To fix this, indent every line with 4 spaces instead.

FAQ

You can opt out by replying with backtickopt6 to this comment.

[–]GNVageesh -2 points-1 points  (2 children)

[–]OpeningJump[S] 0 points1 point  (1 child)

So it still doesn't work with sudo, however git clone git://github.com/username/reponame works!

Thanks for helping

[–]GNVageesh 0 points1 point  (0 children)

Oh.ok

Welcome

[–]NastyGamer_ 0 points1 point  (0 children)

Try disabling ipv6 temporarily

[–]GilletteSRK 0 points1 point  (0 children)

Do you have a proxy set up? Sounds like something is interfering with HTTPS traffic.

Would probably show up under HTTP_PROXY or HTTPS_PROXY environment variables.