Repository navigation
Not working #2
Copy link
Copy link
Closed
Description
Trying out catapultjs. Unfortunately not working at all. I did the quick start but i'm having these issues:
- it's not possible to specify the ssh key in deploy config?
- some sock error: (possible because windows?)
==> [production] setup directories
ℹ ExecaError: Command failed with exit code 4294967295: ssh -o "ControlMaster=auto" -o
"ControlPath=C:\Users\Michael\AppData\Local\Temp\cata-dd9c1426.sock" -o "ControlPersist=300" "deploy@*****" "bash -lc
'echo
CiAgICBzZXQgLWUKICAgIG1rZGlyIC1wICcvaG9tZS9kZXBsb3kvc3BsaXQtZmxhcCcKICAgIG1rZGlyIC1wICcvaG9tZS9kZXBsb3kvc3BsaXQtZmxhcC9yZWxlYXNlcycKICAgIG1rZGlyIC1wICcvaG9tZS9kZXBsb3kvc3BsaXQtZmxhcC9zaGFyZWQnCiAgICBta2RpciAtcCAnL2hvbWUvZGVwbG95L3NwbGl0LWZsYXAvLmNhdGFwdWx0JwogICAgCiAgICAKICA=|base64
-d|bash'"
getsockname failed: Not a socket\r
Read from remote host *******: Unknown error
⁃ at getFinalError (/node_modules/execa/lib/return/final-error.js:6:9)
1 ┃ // When the subprocess fails, this is the error instance being returned.
2 ┃ // If another error instance is being thrown, it is kept as `error.cause`.
3 ┃ export const getFinalError = (originalError, message, isSync) => {
4 ┃ const ErrorClass = isSync ? ExecaSyncError : ExecaError;
5 ┃ const options = originalError instanceof DiscardedError ? {} : {cause: originalError};
❯ 6 ┃ return new ErrorClass(message, options);
7 ┃ };
8 ┃
9 ┃ // Indicates that the error is used only to interrupt control flow, but not in the return value
10 ┃ export class DiscardedError extends Error {}
11 ┃
⁃ at makeError (/node_modules/execa/lib/return/result.js:108:16)
⁃ at getAsyncResult (/node_modules/execa/lib/methods/main-async.js:168:4)
⁃ at handlePromise (/node_modules/execa/lib/methods/main-async.js:151:17)
⁃ at process.processTicksAndRejections (node:internal/process/task_queues:103:5)
⁃ at async setupHost (/node_modules/@catapultjs/deploy/build/src/deployer.js:25:5)
⁃ at async initializeHost (/node_modules/@catapultjs/deploy/build/src/deployer.js:36:5)
⁃ at async Setup.run (/node_modules/@catapultjs/deploy/build/commands/setup.js:14:13)
⁃ at async Setup.exec (/node_modules/@adonisjs/ace/build/index.js:712:18)
⁃ at async #execMain (/node_modules/@adonisjs/ace/build/index.js:2184:4)
Metadata
Metadata
Assignees
Labels
No labels
Activity
batosai commentedon Jul 25, 2026
Thanks for the feedback!
You're right, at the moment it's not possible to specify a custom path for the SSH key. I'll add support for that.
As for Windows support, I haven't tested it at all yet. I should be able to look into it by the end of the summer.
Could you tell me a bit more about your environment? In particular, what are you using for SSH (OpenSSH, Git for Windows, WSL, PuTTY, etc.)?
MichaelBelgium commentedon Jul 25, 2026
Well my goal is to find an easier solution to deploy nodejs applications to my server and that only the files are on the server that are required to run it. So no dev packages, no .env files, anything thats not needed shouldn't be on there,
Currently it's complicated - idk why nodejs apps are so hard to deploy (compared to PHP which is my main field).
My dev environment is just my local PC, windows. And on server there's prod and/or testing environments.
I use the ssh client Termius mostly, before it was Putty. If these 2 inquires get resolved, i think my goal might be reached :) But i gotta see how the recipes will behave. I got 2 nodejs applications right now: astro and adonisjs.
batosai commentedon Jul 25, 2026
The socket error isn't related to Termius or PuTTY.
catapultdoesn't interact with your SSH client directly. It simply invokes thessh,scp, andrsyncexecutables available on yourPATHusing standard OpenSSH syntax. According to your logs, it's using the native Windows OpenSSH (ssh.exe), and that's where the failure occurs:catapultrelies on SSH connection multiplexing (ControlMaster/ControlPath) to reuse a single SSH connection across multiple commands. Unfortunately, the native Windows OpenSSH implementation doesn't support control sockets, so the connection fails immediately. In addition, Windows doesn't providersyncout of the box, while several deployment recipes depend on it.The easiest way to get things working right now is to run
catapultfrom WSL2.Inside a WSL (Ubuntu) environment you'll have a full OpenSSH implementation along with
rsync. SSH multiplexing works as expected, and your~/.ssh/config(IdentityFile,User,Port, etc.) behaves exactly the same as it does on Linux or macOS. Just move your project into WSL and runcatapultfrom there—no configuration changes required.I'm also planning a couple of improvements on the
catapultside:Support for a custom SSH key per host.
Automatic (or optional) disabling of connection multiplexing when it's not supported
Deploying only the files needed at runtime without development dependencies or your .env file, is exactly what catapult is designed for. Once you're past this issue, I can help you set up the right deployment recipe for Astro or AdonisJS.
MichaelBelgium commentedon Jul 25, 2026
No shit 😅 The error makes it clear it uses the ssh executable which every system has
It's this line in the
sshControlArgsfunction:deploy/src/utils.ts
Line 86 in 7aa3de3
This file doesn't exist on windows I believe. If I do an early return when the system is windows, the setup command does work 🎉
But for now i'll wait for fix instead of using WSL
Ok great!
batosai commentedon Jul 26, 2026
Both changes are in and published under the
betatag.I don't have a Windows machine to test on at the moment, so I really can't validate
this on your platform myself. I'd genuinely appreciate it if you could give the beta
a try and let me know how it goes, your feedback is what will let me confirm the fix
and cut a proper release 🙏
1. The sock error is fixed. Connection multiplexing (
ControlMaster/ControlPath)is now auto-disabled on Windows, since native OpenSSH has no control-socket support
that's exactly the
getsockname failed: Not a socketyou hit. Nothing to configure,it's automatic. If you ever need to override it, there's a per-host
multiplexingboolean.
2. Custom SSH key path. New per-host
identityFileon the objectsshform:{ "name": "production", "ssh": { "user": "deploy", "host": "example.com", "port": 22, "identityFile": "C:/Users/Michael/.ssh/deploy_ed25519" }, "deployPath": "/home/deploy/myapp" }On Windows, use forward slashes (or
~) in the path to avoid backslash escaping.(If you use a string alias like
"deploy@example.com"instead, configure the keyvia
~/.ssh/config→IdentityFile.)One heads-up for later: the
setupcommand and everything overssh/scpshould now work on native Windows. But
recipes/rsyncneeds anrsyncbinary, which native Windows doesn't shipLet me know how the
setupand a deploy go on your end, if it works I'll cut aproper release.
MichaelBelgium commentedon Jul 27, 2026
Both issues are resolved, great!
Trying out the first deploy takes suspicious long, been waiting for 15 minutes already,. It's doing the scp command.
I suspect it's copying everything, including the whole node_modules folder? That'll take ages
Do i only have to do this in deploy.config.ts if my project is astro? Or does it require something more.
I expect it should build locally and then copy the build to the server? But the scp copies my whole dev environment
batosai commentedon Jul 27, 2026
Great thanks for the feedback.
You can use the static recipe: https://catapultjs.com/guide/recipes/astro_static
MichaelBelgium commentedon Jul 27, 2026
Ok, gonna close this because the initial issues got fixed, thx for the help
feat(ssh): custom identityFile, multiplexing toggle, clearer errors (#2)