I am writing a script in node.js
to clone a git repository.
const { exec } = require('child_process');
exec('git clone <path>.git', (err, stdout, stderr) => {
if(err){
return;
}
console.log(`stdout: ${stdout}`);
console.log(`stderr: ${stderr}`);
});
I need to pass the passphrase key in order to clone using the public key. How to pass it in the single line as an argument for exec('git clone <path>.git'
Passphrase should pass as a param and it should not be saved
Rather than moving in to 2 steps is it possible to do in a single step?