在windows平台下使用mygit软件连接github时,按照github官网上的Set Up Git一步一步来的时候,到$ ssh -T git@github.com时,显示:ssh: connect to host github.com port 22: Bad file number。这是为什么?
关注者
8被浏览
10,535登录后你可以
不限量看优质回答私信答主深度交流精彩内容一键收藏
貌似是因为22端口默认是不开启的。创建一个默认路径的publickey (/c/user/UserName/.ssh/id_rsa)
再新建一个config 文件(无拓展名) 内容可参照:
Host http://github.com
User [username]
HostName http://ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443