git ssh: connect to host github.com port 22: Connection refused-11617433
报错如下# git push -u origin master
ssh: connect to host github.com port 22: Connection refused
fatal: The remote end hung up unexpectedly
公钥已经传到github上的话,分析原因为username没有指定对
cat /root/.gitconfig
name = test
email = test@test.com
cat /root/.ssh/config
Host github.com
User test
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443
我的问题就是上面两个用户没有一样,改为一样后,测试成功
# ssh -T git@github.com
The authenticity of host ':443 (:443)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added ':443,:443' (RSA) to the list of known hosts.
页:
[1]