I have two bitbucket accounts, one personal and the other is for work. I use ssh for both of them and I have different ssh keys for each. I am trying to pull changes from one bitbucket account onto my local branch but I keep getting this error
$ git pull origin master
client_loop: send disconnect: Connection reset by peeriB/s
fetch-pack: unexpected disconnect while reading sideband packet
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
How can I solve this issue
CodePudding user response:
First, the line that seems to read:
client_loop: send disconnect: Connection reset by peeriB/s
doesn't really say that. What it says is:
Receiving objects: XX% (X/Y), X KiB | XXXX KiB/s
(with some numeric values in the X and Y sections, and maybe MiB/s or some other unit towards the end), which is then overwritten by:
client_loop: send disconnect: Connection reset by peer
The "Connection reset by peer" error indicates that the peer—the Git hosting system from which you're fetching as the first of the two commands that git pull
runs—has decided that it no longer wishes to talk to your computer and has abruptly shut down the connection.
If you're using https, this often happens because of some bad interposition hardware and/or software that wrecks the data being transferred. For instance, some filters that purport to protect you from spam, pornographic material, etc., simply don't work and do this instead. (Some partly work and do this in addition to working.) So if you are using https, or some sort of network security filter, consider using ssh and/or turning off the filtering software or hardware. (Remember though that the filter may be doing something useful along with breaking Git.) You mention ssh keys so you may already be using ssh; in this case broken hardware and/or software is less likely but is still possible.
If that's not the case, you might just have a sufficiently flaky network connection that it's breaking when doing long transfers. In this case you'll just need to improve your network connection, or avoid doing long data transfers across it.