我的第一次 SSH 连接有问题。是的,我已经完成了您的指南,已经尝试了您的“处理防火墙和代理”文章,但问题仍然存在。我使用的是 Win7 32 位,Windows 防火墙被禁用,没有任何第三方防火墙,ESET Nod32 Antivirus 没有阻止任何端口,我没有使用任何代理(也不是本地代理)。
这是日志:
普通SSH连接试试
C:\Users\Mariusz>ssh -vvv git@github.com
OpenSSH_4.6p1, OpenSSL 0.9.8e 23 Feb 2007
debug2: ssh_connect: needpriv 0
debug1: Connecting to github.com [207.97.227.239] port 22.
debug1: connect to address 207.97.227.239 port 22: Not owner
ssh: connect to host github.com port 22: Bad file number
Run Code Online (Sandbox Code Playgroud)NCAT连接尝试
C:\Users\Mariusz>ncat github.com 22
Strange connect error from 207.97.227.239 (10013): No error
10013 = WSAEACCES
Run Code Online (Sandbox Code Playgroud)
我认为“smart-http-support”方法对我不起作用,因为我还没有创建一个仓库。
我刚刚在git init本地完成,并在git push返回相同错误的步骤处停止:
ssh: connect to host github.com port 22: Bad file number
fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)开瓶器方法(指南中的第一篇文章)
在 PUTTYing 时(在 bg 中有选美),输入登录后 - 发生错误(MessageBox):
Disconnected: No supported authentication methods available
Run Code Online (Sandbox Code Playgroud)
在终端中,这条消息被打印出来:
Server refused our key
Run Code Online (Sandbox Code Playgroud)我已经正确生成了密钥,使用ssh-keygen.
我还没有尝试通过编辑的方法,~/.ssh/config因为我认为这是因为我没有将任何东西推送到我的远程仓库,所以我将无法克隆任何东西。
SSH 转发方法对我不起作用,因为它“需要访问外部 SSH 服务器”而我目前没有。
我还能做什么?
您可以使用智能 HTTP 方法。只要按照第二个例子说明和使用推,而不是克隆。例如:
git push https://mariusz@github.com/mariusz/project.git
Run Code Online (Sandbox Code Playgroud)
它适用于所有git涉及远程存储库的命令。