ssh-agent service allows adding multiple keys (including ones protected with a passphrase) to a single pool of ssh keys, which can be shared across multiple projects.
Required dsh version: 1.20.0+
-
Make sure dsh version is
1.20.0
or higher. -
dsh reset ssh-agent
(only necessary when updating from older versions). -
Add the following configuration option to the
cli
service in your projectsdocker-compose.yml
file:For Compose file format version 1
cli: ... volumes_from: - ssh-agent ...
For Compose file format version 2
cli: ... volumes_from: - container:ssh-agent ...
-
Reset the cli container
dsh reset cli
. -
See
dsh help ssh-agent
for more usage information.