I recently had to clone a very large repository through SSH, every time i did i got this error

 

I could be the connection is bad , i finally fixed by using the commands below: