You are not logged in.

#1 2022-10-23 18:00:20

pouridev
Member
Registered: 2021-03-10
Posts: 5

Can't access github from terminal

I noticed I couldn't use "git clone" to clone repos from github recently. It's just stuck like "Cloning into 'x'..."
But I still can access github from my firefox browser. neither 'git' nor 'curl' & 'wget'.. nothing works from terminal. I'm not using any firewalls to the point I am aware of.
And still can connect with:
"openssl s_client -connect github.com:443
CONNECTED(00000003)"
Updated Arch today and using linux kernel: 5.15.74-1-lts

Offline

#2 2022-10-23 18:20:57

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: Can't access github from terminal

https or ssh?

Offline

#3 2022-10-23 19:13:25

lfitzgerald
Member
Registered: 2021-07-16
Posts: 173

Re: Can't access github from terminal

Try the SSH. Just do "ssh github.com" and if it gives you some response (even if it's "access denied") as opposed to hanging then you can just set up SSH and use that, it's better anyway.

Also try the gh CLI, that can do "gh repo clone ORG/REPO". It also has some helpers for auth. Maybe that will help.

Offline

#4 2022-10-23 19:44:24

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: Can't access github from terminal

neither 'git' nor 'curl' & 'wget'.. nothing works

https://bbs.archlinux.org/viewtopic.php?id=57855

What's the output of

curl -v https://github.com > /dev/null

?

Online

#5 2022-10-24 11:31:27

pouridev
Member
Registered: 2021-03-10
Posts: 5

Re: Can't access github from terminal

seth wrote:

neither 'git' nor 'curl' & 'wget'.. nothing works

https://bbs.archlinux.org/viewtopic.php?id=57855

What's the output of

curl -v https://github.com > /dev/null

?

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0*   Trying 140.82.121.4:443...
* Connected to github.com (140.82.121.4) port 443 (#0)
* ALPN: offers h2
* ALPN: offers http/1.1
*  CAfile: /etc/ssl/certs/ca-certificates.crt
*  CApath: none
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
  0     0    0     0    0     0      0      0 --:--:--  0:00:40 --:--:--     0^C

Try the SSH. Just do "ssh github.com" and if it gives you some response (even if it's "access denied") as opposed to hanging then you can just set up SSH and use that, it's better anyway.
Also try the gh CLI, that can do "gh repo clone ORG/REPO". It also has some helpers for auth. Maybe that will help.

$ ssh github.com                                     
pouridev@github.com: Permission denied (publickey).

https or ssh?

https

Offline

#6 2022-10-24 14:54:30

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: Can't access github from terminal

…
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]

This here should go on w/

* TLSv1.3 (IN), TLS handshake, Server hello (2):
{ [122 bytes data]
* TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8):
{ [19 bytes data]
* TLSv1.3 (IN), TLS handshake, Certificate (11):
{ [2459 bytes data]
…
pacman -Qikk ca-certificates-utils
TZ=UTC date
ip a # MTU
iptables -nvL # "I'm not using any firewalls to the point I am aware of", also see https://wiki.archlinux.org/title/Nftables#List_tables 

are there any VPNs, PiHoles etc. involved?
Can you

curl -v https://google.com > /dev/null

Online

#7 2022-10-25 08:07:42

lfitzgerald
Member
Registered: 2021-07-16
Posts: 173

Re: Can't access github from terminal

pouridev wrote:
$ ssh github.com                                     
pouridev@github.com: Permission denied (publickey).

Based on this, I think if you follow https://docs.github.com/en/authenticati … b-with-ssh, and then use SSH links (git@github instead of https://), your git commands should work. SSH is a better protocol anyhow.

Offline

#8 2022-10-25 11:40:32

seth
Member
Registered: 2012-09-03
Posts: 60,805

Re: Can't access github from terminal

Whatever happens wrt to github, don't gloss over the fact that the TLS handshake fails, what likely points to a more general problem w/ the setup.

Online

Board footer

Powered by FluxBB