add git deploy key wrapper functionality
This commit is contained in:
parent
73d2440ad4
commit
17860381fc
9 changed files with 88 additions and 8 deletions
|
@ -5,6 +5,14 @@ try {
|
|||
// Kill the started SSH agent
|
||||
console.log('Stopping SSH agent')
|
||||
execSync('kill ${SSH_AGENT_PID}', { stdio: 'inherit' })
|
||||
|
||||
const home = process.env['HOME'];
|
||||
const homeSsh = `${home}/.ssh`;
|
||||
const gitSSHWrapperPath = path.join(homeSsh, 'git-deploy-key-wrapper.sh');
|
||||
if (fs.existsSync(gitSSHWrapperPath)) {
|
||||
console.log('Removing ssh git SSH wrapper');
|
||||
fs.unlinkSync(gitSSHWrapperPath);
|
||||
}
|
||||
} catch (error) {
|
||||
console.log(error.message);
|
||||
console.log('Error stopping the SSH agent, proceeding anyway');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue