-
Star
(545)
You must be signed in to star a gist -
Fork
(124)
You must be signed in to fork a gist
-
-
Save Tamal/1cc77f88ef3e900aeae65f0e5e504794 to your computer and use it in GitHub Desktop.
$ git clone git@github.com:xxxxx/xxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
ssh: connect to host github.com port 22: Connection timed out | |
fatal: Could not read from remote repository. | |
$ # This should also timeout | |
$ ssh -T git@github.com | |
ssh: connect to host github.com port 22: Connection timed out | |
$ # but this might work | |
$ ssh -T -p 443 git@ssh.github.com | |
Hi xxxx! You've successfully authenticated, but GitHub does not provide shell access. | |
$ # Override SSH settings | |
$ vim ~/.ssh/config | |
``` | |
# Add section below to it | |
Host github.com | |
Hostname ssh.github.com | |
Port 443 | |
``` | |
$ ssh -T git@github.com | |
Hi xxxxx! You've successfully authenticated, but GitHub does not | |
provide shell access. | |
$ git clone git@github.com:xxxxxx/xxxxx.git my-awesome-proj | |
Cloning into 'my-awesome-proj'... | |
remote: Enumerating objects: 15, done. | |
remote: Counting objects: 100% (15/15), done. | |
remote: Compressing objects: 100% (14/14), done. | |
remote: Total 15 (delta 0), reused 15 (delta 0), pack-reused 0 | |
Receiving objects: 100% (15/15), 22.90 KiB | 4.58 MiB/s, done. |
also if it did not work and the output was :
Bad owner or permissions on /home/poparent/.ssh/config
just run this command:
chmod 600 ~/.ssh/config
谁能解释为什么会发生此错误?GitHub 是否要求您使用端口 443 进行 ssh 访问?
ssh: connect to host github.com port 22: Network is unreachable fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
(Hope it works for you) Me too, so I gave up this method and tried another thing:
It works!!
Thank you so much. It worked out for me.
Thank you!
It worked ! Thank you !
Thank you so much
How can we gain ssh/shell access so that we could push changes back to github repositories? (I work on windows ubuntu bash terminal)
THANK YOU THANK YOU THANK YOU
This also works for connection refused
error. Thank you.
Thank you
Thanks!
Thanks! The port was also an issue for me and this resolved it
THANK YOU!!
Thank you, Tamal! I spent on it few hours, before i found your solution.
Thank you! Editing ~/.ssh/config
works just fine for me
also if it did not work and the output was :
Bad owner or permissions on /home/poparent/.ssh/config
just run this command:
chmod 600 ~/.ssh/config
This works for me!
Thank you Tamal !
Adding the port to ssh config fixed the issue for me (Monterey 12.6)
worked perfectly, thank you!
thanks
anyone know why this actually works?
thank you so much!
Host github.com
Hostname ssh.github.com
Port 443
what should i do after typing it in?
I am new to github
After 3 hours of hard work, I found this nugget! THANK YOU
Thank you!
This is not working for me.
ssh -T git@github.com
-> ssh: connect to host github.com port 22: Connection timed out
ssh -T -p 443 git@ssh.github.com
-> ssh: connect to host ssh.github.com port 443: Connection timed out
If I push using the same ssh keys with a program like SmartGit (for Ubuntu, and it ask for the ssh key so I just add them and the passphrase), I CAN push using that program.
I really don't understand why I can't push with cmd...
Anyone knows what is happening?.
After hours of searching for a solution, this has worked for me!!! Thank you so much!
It also works for me, but I want to konw why it must be this?
You are my savior .... 3hours on it, testing everything and nothing worked !
when i put this line [vim ~/.ssh/config] into my terminal , my terminal stopped working and i can’t run any other line