windows: Use nc-esque ssh askpass auth for remoting (#39646)

This lets us avoid storing user PW in ZED_ASKPASS_PASSWORD env var.
Release Notes:

- N/A
This commit is contained in:
Piotr Osiewicz
2025-10-07 09:48:03 +02:00
committed by GitHub
parent 963204c99d
commit 41ac6a8764
6 changed files with 212 additions and 159 deletions
+5 -2
View File
@@ -7,7 +7,7 @@ use crate::{
worktree_store::{WorktreeStore, WorktreeStoreEvent},
};
use anyhow::{Context as _, Result, anyhow, bail};
use askpass::{AskPassDelegate, EncryptedPassword};
use askpass::{AskPassDelegate, EncryptedPassword, IKnowWhatIAmDoingAndIHaveReadTheDocs};
use buffer_diff::{BufferDiff, BufferDiffEvent};
use client::ProjectId;
use collections::HashMap;
@@ -2120,7 +2120,10 @@ impl GitStore {
.lock()
.insert(envelope.payload.askpass_id, askpass);
response.try_into()
// In fact, we don't quite know what we're doing here, as we're sending askpass password unencrypted, but..
Ok(proto::AskPassResponse {
response: response.decrypt(IKnowWhatIAmDoingAndIHaveReadTheDocs)?,
})
}
async fn handle_check_for_pushed_commits(