If you're having the all time classic Broken pipe: the remote hung up unexpectedly error, a quick way to solve it is switching your computer to another wifi network (like the one your smartphone can provide).
But if this keeps happening it's a pain to have to do it constantly. So another solution can be to set up a new remote (the thing that knows where the GitHub repo is), but this time through https instead of ssh. This way, if you get the broken pipe, you can patch it up in a single command.
- Go to the repo in GitHub
- Select
Clone or Download - Select
Use HTTPS