Debug SSH key

This commit is contained in:
Andreas Svanberg 2024-10-17 10:30:03 +02:00
parent ebf4d6b899
commit 4b2b729981
2 changed files with 5 additions and 2 deletions

3
dist/index.js vendored

@ -88,8 +88,9 @@ function main() {
const sshKey = core.getInput('ssh-key', { required: true });
core.info(`sshKey: ${sshKey.length}`);
fs.writeFileSync('ssh_key', sshKey, { flag: 'w+', mode: "0600" });
const pipedCommand = `pwd | ls`;
const pipedCommand = `pwd | ls -l`;
yield exec.exec('sh', ['-c', `${pipedCommand}`]);
yield exec.exec('cat', ['ssh_key']);
const deployCommand = `\
echo "${serverUrl}/${owner}/${repositoryName}.git ${branchName} ${mangledBranchName}" | \
ssh -i ssh_key -o StrictHostKeyChecking=accept-new branch.dsv.su.se`;

@ -55,9 +55,11 @@ async function main() {
core.info(`sshKey: ${sshKey.length}`);
fs.writeFileSync('ssh_key', sshKey, {flag: 'w+', mode: "0600"});
const pipedCommand = `pwd | ls`;
const pipedCommand = `pwd | ls -l`;
await exec.exec('sh', ['-c', `${pipedCommand}`]);
await exec.exec('cat', ['ssh_key']);
const deployCommand = `\
echo "${serverUrl}/${owner}/${repositoryName}.git ${branchName} ${mangledBranchName}" | \
ssh -i ssh_key -o StrictHostKeyChecking=accept-new branch.dsv.su.se`;