bibucket ssh_exchange_identification:读取:由对等方重置的连接 [英] bibucket ssh_exchange_identification: read: Connection reset by peer

查看:220
本文介绍了bibucket ssh_exchange_identification:读取:由对等方重置的连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图设置一个无密码的git连接到bitbucket。我在Windows Server 2008上使用git bash。



通过HTTPS克隆工作正常:

  nskoric @ P8-DEV / z / test 
$ git克隆https://dijxtra@bitbucket.org/nek-plan/gittest.git
克隆到'gittest'.. 。
'https://dijxtra@bitbucket.org'的密码:
remote:计数对象:3,完成。
remote:合计3(delta 0),重用0(delta 0)
解包对象:100%(3/3),完成。
检查连通性...完成。

但是,HTTPS不可接受,因为我需要无密码登录。所以我生成了一个私钥/公钥对,将公钥上传到bitbucket,并在.ssh / config中设置Host / IdentitiyFile。然后我尝试连接并失败。



端口22在我公司的防火墙上关闭:

  nskoric @ P8-DEV / z / test 
$ ssh git@bitbucket.org -vv
OpenSSH_6.6.1,OpenSSL 1.0.1i 2014年8月6日
debug1:读取配置data /u/.ssh/config
debug1:/u/.ssh/config第1行:为* bitbucket.org应用选项
debug2:ssh_connect:needpriv 0
debug1:连接到bitbucket .org [131.103.20.168] port 22.

因此,我使用端口443 bitbucket文档:

  nskoric @ P8-DEV / z / test 
$ git clone ssh:// git @ altssh .bitbucket.org:443 / nek-plan / gittest.git
克隆到'gittest'中...
ssh_exchange_identification:read:由同级重置的连接
致命:无法从远程存储库读取。

请确保您拥有正确的访问权限
并存在存储库。

我试着用google搜索bitbucket ssh_exchange_identification:read:Connection reset by peer,但没有帮助: - /然后我试着调试SSH连接,但是这是我得到的最远的:

  nskoric @ P8-DEV / z / test 
$ ssh git@altssh.bitbucket.org -p 443 -vv
OpenSSH_6.6.1,OpenSSL 1.0.1i 2014年8月6日
debug1:读取配置数据/u/.ssh/config
debug1:/u/.ssh/config第1行:为* bitbucket.org应用选项
debug2:ssh_connect:needpriv 0
debug1:连接到altssh.bitbucket.org [131.103.20.174]端口443.
debug1:已建立连接。
debug1:身份文件/u/.ssh/bitbucketnek类型1
debug1:身份文件/u/.ssh/bitbucketnek-cert类型-1
debug1:启用协议2.0的兼容模式
debug1:本地版本字符串SSH-2.0-OpenSSH_6.6.1
ssh_exchange_identification:read:由同级重置的连接

因此,SSH找到了正确的身份文件(/u/.ssh/bitbucketnek),然后死亡。现在,如果我能够弄清楚问题出在我的bitbucketnek私钥,还是我们公司的防火墙出现了问题,或者是第三方面的问题,那将会非常有帮助。任何想法?



感谢!

解决方案

我在一个共享主机环境中,特别是GoDaddy,以及它给了我这个错误的原因:

  ssh_exchange_identification:read:连接重置由同级

解决方案:我的本地计算机的IP已被GoDaddy阻止,所以我必须联系他们的支持,给他们一个运行错误输出的截图:

lockquote
ssh -v user @ domain

,并且还为他们提供我的ip。他们注意到我的IP实际上已被封锁,将其删除,并解决了问题。

I'm trying to setup a passwordless git connection to bitbucket. I'm using git bash on Windows Server 2008.

Cloning over HTTPS works fine:

nskoric@P8-DEV /z/test
$ git clone https://dijxtra@bitbucket.org/nek-plan/gittest.git
Cloning into 'gittest'...
Password for 'https://dijxtra@bitbucket.org':
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
Checking connectivity... done.

But, HTTPS is not acceptable because I need passwordless login. So I generated a private/public key pair, uploaded public key to bitbucket and set up Host/IdentitiyFile in .ssh/config. Then I tried connecting and failed.

Port 22 is closed on my company firewall:

nskoric@P8-DEV /z/test
$ ssh git@bitbucket.org -vv
OpenSSH_6.6.1, OpenSSL 1.0.1i 6 Aug 2014
debug1: Reading configuration data /u/.ssh/config
debug1: /u/.ssh/config line 1: Applying options for *bitbucket.org
debug2: ssh_connect: needpriv 0
debug1: Connecting to bitbucket.org [131.103.20.168] port 22.

So, I'm using port 443, as per bitbucket documentation:

nskoric@P8-DEV /z/test
$ git clone ssh://git@altssh.bitbucket.org:443/nek-plan/gittest.git
Cloning into 'gittest'...
ssh_exchange_identification: read: Connection reset by peer
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I tried googling "bitbucket ssh_exchange_identification: read: Connection reset by peer", but it didn't help :-/ Then I tried debugging SSH connection, but this is farthest I got:

nskoric@P8-DEV /z/test
$ ssh git@altssh.bitbucket.org -p 443 -vv
OpenSSH_6.6.1, OpenSSL 1.0.1i 6 Aug 2014
debug1: Reading configuration data /u/.ssh/config
debug1: /u/.ssh/config line 1: Applying options for *bitbucket.org
debug2: ssh_connect: needpriv 0
debug1: Connecting to altssh.bitbucket.org [131.103.20.174] port 443.
debug1: Connection established.
debug1: identity file /u/.ssh/bitbucketnek type 1
debug1: identity file /u/.ssh/bitbucketnek-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.6.1
ssh_exchange_identification: read: Connection reset by peer

So, SSH found the right identity file (/u/.ssh/bitbucketnek) and then died. Now, it would be really helpful if I could figure out if the problem is in my "bitbucketnek" private key, or is the problem in our company firewall, or something third. Any ideas?

Thanks!

解决方案

As a helpful annotation, I had this case in a shared hosting environment, specifically GoDaddy, and the reason It gave me this error:

ssh_exchange_identification: read: Connection reset by peer

Solution: my local machine's ip had been blocked by GoDaddy, so I had to contact their support, send them a screenshot of the error output from running:

ssh -v user@domain

, and also provide them with my ip. They noticed my ip had been in fact blocked, removed it, and problem solved.

这篇关于bibucket ssh_exchange_identification:读取:由对等方重置的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆