joshb
April 2, 2024, 9:31pm
1
Hey ya’ll… I found this:
https://discourse.roots.io/t/tweaks-for-sync-script-with-trellis-and-lima/26715/2
And attempting to connect to Lima without any luck.
✅ Able to connect to production
❌ Unable to connect to development Error: Cannot connect over SSH using provided configuration.
Not sure I am setting up my ssh line for development correctly. Anyone have any pointers or can help guide me?
ben
April 2, 2024, 9:51pm
2
You can use trellis alias
to generate the correct WP-CLI aliases
joshb
April 3, 2024, 4:51pm
3
Great. I see it created wp-cli.trellis-alias.yml
and then I copied the development lines over to wp-cli.yml
.
It’s still able to connect to production and now it takes a lot longer to attempt to connect to development but eventually fails with the same error.
Running wp @development
or wp @production
results in:
Error: Cannot connect over SSH using provided configuration.
ben
April 3, 2024, 6:33pm
4
What does your aliases file look like?
What’s the error if you try to SSH into the VM using the same details from the alias?
joshb
April 3, 2024, 7:15pm
5
trellis alias
generated this for the development lines without any user defined.
@development:
ssh: "newproject.test"
path: "/srv/www/newproject.com/current/web/wp"
WIth vagrant, it would be vagrant@newproject.test
right?
Not sure what I should be using here for Lima.
Running limactl show-ssh -f config newproject.com
shows the user as my macOS username joshb
as does the inventory file. I’ve tried using that as my user and it just hangs.
joshb
April 3, 2024, 7:39pm
6
ssh joshb@newproject.test
just hangs and eventually times out.
trellis vm shell
immediately connects:
joshb@lima-client:/srv/www/newproject.com/current$
joshb
April 3, 2024, 7:50pm
7
Alright, finally figured it out and connected via the sync script.
Need to us your macOS username@lima-[lima instance name], like so:
ssh joshb@lima-newproject.com
Trellis alias did not do that correctly afaict.
2 Likes
ben
April 3, 2024, 10:15pm
8
Glad you’re up and running!
I tested a fresh Lima install and using the generated file from trellis alias
, which worked without any modifications — it’s possible there’s something in your SSH config that’s conflicting with it
1 Like
joshb
April 4, 2024, 2:12am
9
It worked without supplying a user?
Thanks for sharing the details how you got it to work!
1 Like