通过http代理使用SSH连接到github会引发107 Service Unavailable错误

时间:2016-10-05 04:11:06

标签: windows github ssh proxy

我有一个绝对的噩梦,有时间与github建立一个有效的ssh连接。我知道我过去已经开始工作了,但不能为我的生活记住如何。

调试输出:

public async Task<List<Rectangle>> ApiDetect(int Id)
{
    FaceServiceClient f = new FaceServiceClient("the api key");
    Microsoft.ProjectOxford.Face.Contract.Face[] faces = await  f.DetectAsync($"http://www.example.com/uphotos/raw/{Id}.jpg");
    // here it stuck
    List<Rectangle> lst = faces.Select(r => new Rectangle
    {
        Height = r.FaceRectangle.Height,
        Width = r.FaceRectangle.Width,
        X = r.FaceRectangle.Left,
        Y = r.FaceRectangle.Top
    }).ToList();
    return lst;
}

https://www.eldos.com/documentation/sbb/documentation/ref_err_ssherrorcodes.html表示debug2: ssh_connect: needpriv 0 debug1: Connecting to github.com [192.30.253.113] port 22. debug1: socket:660, io:0000025981539ED0, fd:3 debug3: w32_fcntl fd:3 debug3: w32_connect fd:3 debug3: connect - io:0000025981539ED0 debug3: connectex - io:0000025981539ED0 debug3: wait() on 1 events and 0 children debug3: finish_connect, io:0000025981539ED0 debug1: finish_connect - ERROR: async io completed with error: 107, io:0000025981539ED0 debug1: connect to address 192.30.253.113 port 22: Unknown error debug3: w32_close fd:3 debug1: close - io:0000025981539ED0, type:1, fd:3, table_index:3 debug2: close - io:0000025981539ED0 ssh: connect to host github.com port 22: No error fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 的SSH错误代码对应107错误。真的没告诉我多少。

我试图通过我的代理尝试显式隧道,但这没有运气。利用我的ssh配置,我将它设置为以下内容:

ERROR_SSH_SERVICE_NOT_AVAILABLE

这最终会吐出另一个错误:

Host github.com
    User         git
    BatchMode    yes
    LogLevel     DEBUG3
    ProxyCommand ncat --proxy $http_proxy --proxy-type http %h %p

如果有人能够至少给我一些调查途径,如果不是真正的解决方案,我真的很感激。

我能找到的最接近的问题是Not able to connect to github repo via ssh using http proxy tunnel,但这需要开瓶器,在我的Windows机器上编译得相当困难(虽然我还在尝试)。

编辑: github的标准帮助文档在这种情况下使用不多,因为我得到的错误与密钥身份验证无关。运行建议的proxy connect is not supported in Windows fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 会导致几乎相同的错误:

ssh -T git@github.com

0 个答案:

没有答案