feat: with ingored host key checking
Some checks failed
continuous-integration/drone/push Build is failing

Signed-off-by: kjuulh <contact@kjuulh.io>
This commit is contained in:
Kasper Juul Hermansen 2023-12-30 22:40:08 +01:00
parent cf05cf4228
commit 7daf873e37
Signed by: kjuulh
GPG Key ID: 57B6E1465221F912

View File

@ -1,7 +1,7 @@
use std::sync::Arc;
use async_trait::async_trait;
use dagger_sdk::{Container, Socket};
use dagger_sdk::{Container, ContainerWithNewFileOptsBuilder, Socket};
use eyre::Context;
use crate::{dagger_middleware::DaggerMiddleware, leptos_service::LeptosService};
@ -26,7 +26,19 @@ impl DaggerMiddleware for SshAgent {
let socket = self.client.host().unix_socket(&sock_var);
let home = container.env_variable("HOME").await?;
let c = container
.with_new_file_opts(
format!("{home}/.ssh/config"),
ContainerWithNewFileOptsBuilder::default().contents(
r#"
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null
"#,
),
)
.with_unix_socket(&sock_var, socket)
.with_env_variable("SSH_AUTH_SOCK", &sock_var);