drushddev

How can I get my ssh keys and identity into ddev's web container?


I have these needs from time to time in the web container:

So how can I get my keys into the container?


Solution

  • DDEV supports having your ssh keys in the container without mounting them there, using an ssh-agent inside docker.

    You can authenticate and add your keys via ddev auth ssh, and they will then be available from every project. This works for ssh from inside the container, private composer repositories, and drush rsync.

    See https://ddev.readthedocs.io/en/stable/users/basics/cli-usage/#ssh-into-containers for docs.