gitamazon-ec2sshdokku

Git push to remote gives "Network is unreachable" error (Windows)


I have an app deployed to dokku running on an ec2 ubuntu instance. I have the .pem key of the instance and I'm able to connect to it and, apparently, successfully add the remote to git. However, whenever I try to push to the remote it gives me the following error:

ssh: connect to host address.of.the.host port 22: Network is unreachable
fatal: Could not read from remote repository.

Here are the steps that I followed so far:

I know very little about this stuff. I'm only trying to update the app with some changes that I've made to the code, so I really appreciate anyone that could help.


Solution

  • Ok so I figured out what the problem was (as always, right after exposing it, but ok).

    I was adding the romote using the host name (dokku@address.of.the.host:app-name). Once I changed it to the ip (public IPv4) it worked...

    This ip can be found at your aws panel > Services > EC2 > Instances > click on the instance's ID > IPv4 public address.