$ git pull ssh: connect to host github.com port 22: Connection refused fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
同样,在使用ssh克隆仓库时也会遇到相同的问题,表现为:
1 2 3 4 5 6 7 8
$ ssh -vT git@github.com OpenSSH_9.0p1, OpenSSL 1.1.1o 3 May 2022 debug1: Reading configuration data /etc/ssh/ssh_config debug1: Connecting to github.com [::1] port 22. debug1: connect to address ::1 port 22: Connection refused debug1: Connecting to github.com [127.0.0.1] port 22. debug1: connect to address 127.0.0.1 port 22: Connection refused ssh: connect to host github.com port 22: Connection refused