# Fix SSH askpass on Windows by invoking \`cli.exe\` directly \(\#52491\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/2b2536de0f9de56da870fbff320412178756245e)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 2b2536de0f9de56da870fbff320412178756245e

Requested commit: 2b2536de0f9de56da870fbff320412178756245e

Commit: 2b2536de0f9de56da870fbff320412178756245e

Tree: bb99ac3e046563329d490a63a40c178d24c72bb4

Author: Zaenalos

Committer: GitHub

## Message

```
Fix SSH askpass on Windows by invoking `cli.exe` directly (#52491)

On Windows, Zed generated a .ps1 askpass script and set **SSH_ASKPASS**
to 'powershell.exe -ExecutionPolicy Bypass -File ...'. SSH calls exec()
on SSH_ASKPASS which cannot exec a command string, causing:

error: ssh_askpass: exec(powershell.exe ...): No such file or directory

Fix by pointing **SSH_ASKPASS** directly to cli.exe and passing the
socket path via **ZED_ASKPASS_SOCKET** env var, which cli.exe reads
before clap parses arguments.

---
> Compiling Zed almost blew up my computer.
---

Related #29048 

Release Notes:

- Fixed some ssh issues on windows that prevented from connecting to a
remote
```

## Parents

- [4b974147f27d1351f01debd8a31c9d3cde490a98](https://git.cafe/gitcafe/zed/commit/4b974147f27d1351f01debd8a31c9d3cde490a98?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/2b2536de0f9de56da870fbff320412178756245e?format=markdown)
