title: How to install a private npm github package during sls deploy
body: <p>My CI/CD serverless deploy is failing because its not able to install a private npm package.</p>
  
  <blockquote>
    <p>Error --------------------------------------------------</p>
    
    <p>npm install failed with code 1
      npm ERR! code ENOENT
      npm ERR! syscall spawn git
      npm ERR! path git
      npm ERR! errno ENOENT
      npm ERR! enoent Error while executing:
      npm ERR! enoent undefined ls-remote -h -t ssh://git@github.com/private-org/private-repo.git
      npm ERR! enoent 
      npm ERR! enoent 
      npm ERR! enoent spawn git ENOENT
      npm ERR! enoent This is related to npm not being able to find a file.
      npm ERR! enoent </p>
    
    <p>npm ERR! A complete log of this run can be found in:
      npm ERR!     /github/home/.npm/_logs/2020-05-28T13_30_18_595Z-debug.log</p>
  
  <pre><code>  at ChildProcess.child.on.exitCode (/github/workspace/node_modules/serverless-webpack/lib/utils.js:91:16)
    at ChildProcess.emit (events.js:198:13)
    at ChildProcess.EventEmitter.emit (domain.js:448:20)
    at maybeClose (internal/child_process.js:982:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:259:5)
  </code></pre>
    
    <p>From previous event:
          at PluginManager.invoke (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:505:22)
          at PluginManager.spawn (/usr/local/lib/node_modules/serverless/lib/classes/PluginManager.js:525:17)
          at ServerlessWebpack.BbPromise.bind.then.then.then (/github/workspace/node_modules/serverless-webpack/index.js:91:53)
          at runCallback (timers.js:705:18)
          at tryOnImmediate (timers.js:676:5)
          at processImmediate (timers.js:658:5)
          at process.topLevelDomainCallback (domain.js:126:23)</p>
    
    <p>Get Support --------------------------------------------
         Docs:          docs.serverless.com
         Bugs:          github.com/serverless/serverless/issues
         Issues:        forum.serverless.com
    Your Environment Information ---------------------------
         Operating System:          linux
         Node Version:              10.20.1
         Framework Version:         1.54.0
         Plugin Version:            3.6.12
         SDK Version:               2.3.1
         Components Core Version:   1.1.2
         Components CLI Version:    1.4.0</p>
  </blockquote>
  
  <pre><code>  deploy:
      name: deploy
      needs: test
      if: startsWith(github.ref, 'refs/tags/')
      runs-on: ubuntu-latest
      steps:
      - uses: actions/checkout@master
      - uses: actions/setup-node@v1
        with:
          node-version: '12.x'
      - uses: webfactory/ssh-agent@v0.2.0
        with:
          ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }} 
      - name: npm install
        run: npm install 
      - name: serverless deploy
        uses: serverless/github-action@master
        with:
          args: deploy
        env:
          AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
          AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
          SLS_DEBUG: true
  </code></pre>
  
  <p>Usually i solve this using a webfactory/ssh-agent@v0.2.0 so the first npm install works fine here and it manages to install the private package using the SSH key provided.</p>
  
  <p>However during serverless deploy i get the above error and it cannot install the private npm package. Is there a way i can specify an SSH key for serverless action to use?</p>