Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

drush

ddev

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

  • ssh to a server from inside the web container
  • Use git to a private repository inside the web container
  • Use rsync (like ddev drush rsync)
  • Use ddev composer with access to private repositories

So how can I get my keys into the container?

like image 295
rfay Avatar asked Jan 02 '23 05:01

rfay


1 Answers

As of ddev v1.4.0+ ddev supports your ssh keys in the container without mounting them there.

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.

like image 118
rfay Avatar answered May 24 '23 21:05

rfay