I have some Jenkins jobs defined using a Jenkins Pipeline Model Definition, which builds NPM projects. I use Docker containers to build these projects (using a common image
Use the SSH agent plugin:
When using this plugin you can use the global credentials.