feat: configure dedicated bot SSH key and non-interactive SSH for git operations.
This commit is contained in:
@@ -59,8 +59,7 @@ services:
|
|||||||
# Project directory - allows git pull and rebuild
|
# Project directory - allows git pull and rebuild
|
||||||
- .:/app/deploy
|
- .:/app/deploy
|
||||||
# SSH Keys for git authentication
|
# SSH Keys for git authentication
|
||||||
- ~/.ssh/id_rsa:/home/bun/.ssh/id_rsa:ro
|
- ~/.ssh/aurora_bot_key:/home/bun/.ssh/id_ed25519:ro
|
||||||
- ~/.ssh/id_ed25519:/home/bun/.ssh/id_ed25519:ro
|
|
||||||
- ~/.ssh/known_hosts:/home/bun/.ssh/known_hosts:ro
|
- ~/.ssh/known_hosts:/home/bun/.ssh/known_hosts:ro
|
||||||
working_dir: /app
|
working_dir: /app
|
||||||
environment:
|
environment:
|
||||||
|
|||||||
@@ -26,7 +26,11 @@ async function execWithTimeout(
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
const child = exec(cmd, {
|
const child = exec(cmd, {
|
||||||
cwd: options.cwd,
|
cwd: options.cwd,
|
||||||
env: { ...process.env, GIT_TERMINAL_PROMPT: "0" }
|
env: {
|
||||||
|
...process.env,
|
||||||
|
GIT_TERMINAL_PROMPT: "0",
|
||||||
|
GIT_SSH_COMMAND: "ssh -o BatchMode=yes"
|
||||||
|
}
|
||||||
}, (error: ExecException | null, stdout: string, stderr: string) => {
|
}, (error: ExecException | null, stdout: string, stderr: string) => {
|
||||||
if (error) {
|
if (error) {
|
||||||
reject(error);
|
reject(error);
|
||||||
|
|||||||
Reference in New Issue
Block a user