-1

(This is a resource for anyone who needs it!)

I spent hours trying to figure out an error that happens when using Dokku on an Amazon EC2, which is that you can't push to the remote Dokku repository: permission denied.

I've tried to generate new SSH keys, using the CLI instead of the installation guide locally hosted on first install, to no avail. There are other solutions to this problem that I've tried and that haven't worked, so for people looking for a last resort, here it is!

torek
  • 448,244
  • 59
  • 642
  • 775

1 Answers1

-1

Firstly, the reason it is more common on Amazon EC2 instances of Dokku, is because there is already a public key in the /.ssh/authorized_keys file, which Dokku pulls and uses.

The way I fixed my problem was to generate a new ssh key, but in an ed25519 format, as this seems to be more commonly accepted by Dokku.

  1. Run ssh-keygen -t ed25519
  2. Open the new public key using vim or a program of your choice
  3. Copy it, then paste it into the installation guide on first install, or use dokku ssh-keys:add [File Location] [SSH Key name]

That should do it! If there are other solutions, feel free to include them!