Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/ssh/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Windows上的Bitbucket禁止SSH git克隆_Git_Ssh_Bitbucket - Fatal编程技术网

Windows上的Bitbucket禁止SSH git克隆

Windows上的Bitbucket禁止SSH git克隆,git,ssh,bitbucket,Git,Ssh,Bitbucket,我正在设置SSH密钥以建立到我公司的私人公司的SSH连接。但我仍然无法克隆存储库。我正在使用Windows10 我使用ssh-keygen命令,按照此链接中针对Windows的说明生成密钥 然后,我还在Bash命令中运行以下命令 $ eval $(ssh-agent) 我为上述命令设置了私钥 ssh-add ~/.ssh/<private_key_file> 在源代码树中,我可以看到我的组织/公司的所有远程存储库。但是当我克隆时,我得到了以下错误 Cloning into '

我正在设置SSH密钥以建立到我公司的私人公司的SSH连接。但我仍然无法克隆存储库。我正在使用Windows10

  • 我使用
    ssh-keygen
    命令,按照此链接中针对Windows的说明生成密钥

  • 然后,我还在Bash命令中运行以下命令

    $ eval $(ssh-agent) 
    
  • 我为上述命令设置了私钥

    ssh-add ~/.ssh/<private_key_file>
    
    在源代码树中,我可以看到我的组织/公司的所有远程存储库。但是当我克隆时,我得到了以下错误

    Cloning into 'my-repo-les'...
    ssh: connect to host bitbucket.org 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.
    
    Command: git -c diff.mnemonicprefix=false -c core.quotepath=false ls-remote https://wai-yan-hein@bitbucket.org/lbresearch/frontendplatform.git
    Output: 
    Error: remote: Forbidden
    fatal: unable to access 'https://wai-yan-hein@bitbucket.org/lbresearch/frontendplatform.git/': The requested URL returned error: 403
    
    在我建立帐户之前。我在Github中使用它。现在我为Bitbucket做准备。这可能是问题所在吗

    当我运行此命令时,连接已超时

    ssh -T hg@bitbucket.org
    

    Bitbucket还将在备用端口上公开其SSH服务,以处理阻止端口22的网络(如您的网络)。试试ssh-Tp443hg@altssh.bitbucket.org-该端口通常用于HTTPS,因此很少被阻止

    如果altssh.bitbucket.org:443返回您的用户名,那么您需要在clone命令中使用不同的URL方案:
    git clonessh://git@altssh.bitbucket.org:443/owner/repo.git


    HTTP状态403与您的SSH问题无关;该状态表示您能够访问Bitbucket,并且您的凭据有效,但您没有权限执行您试图执行的操作。

    至少部分问题是连接问题:
    ssh:connect to host bitbucket.org端口22:Network不可访问
    ,并且此超时
    ssh-Thg@bitbucket.org
    。您的DNS设置是否解析bitbucket.org?您的ssh/22端口被阻止了吗?