Skip to content

Commit b14b862

Browse files
committed
Mount the entire user SSH directory into build container
This enables the user to use an key file format (RSA, ED25519, ...). Additionally, it allows more complex workflows (such as different SSH keys for specfic sites, such as Github or Bitbucket), since the .ssh/config file is also mounted into the container. Fixes serverless#488
1 parent 6ecc5ad commit b14b862

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

lib/pip.js

+1-4
Original file line numberDiff line numberDiff line change
@@ -201,10 +201,7 @@ function installRequirements(targetFolder, serverless, options) {
201201
if (options.dockerSsh) {
202202
// Mount necessary ssh files to work with private repos
203203
dockerCmd.push(
204-
'-v',
205-
`${process.env.HOME}/.ssh/id_rsa:/root/.ssh/id_rsa:z`,
206-
'-v',
207-
`${process.env.HOME}/.ssh/known_hosts:/root/.ssh/known_hosts:z`,
204+
`${process.env.HOME}/.ssh/:/root/.ssh/:z`,
208205
'-v',
209206
`${process.env.SSH_AUTH_SOCK}:/tmp/ssh_sock:z`,
210207
'-e',

0 commit comments

Comments
 (0)