This is just a warning which shouldn’t affect anything. If you aren’t running trellis init then that means you’re managing dependencies (like Ansible) yourself and presumably it worked before as you said.
That’s coming from Ansible and the deploy playbook; nothing related to trellis-cli which just invokes ansible-playbook.
But I’m assuming that’s the actual issue here since that’s an interactive prompt and it won’t get any input so it fails.
repo_accept_hostkey: true doesn’t matter here either. That’s for when git is cloning your repo on the remote server but the deploy is failing well before then. It’s failing trying to SSH from CircleCI to your staging server as the web user.
This is an SSH client issue on CircleCI. This means you need to configure CircleCI to accept your staging’s server as a known host.
I’ve very doubtful this is related to trellis-cli. To confirm that you can remove it entirely and just run ansible-playbook deploy.yml -e env=staging -e site=whatever
Yeah you are right, I just recreated the deploy from November 30th where it was successful. I used same env trellis-cli 1.0.0 trellis 1.7.1 and it stuck on SSH connection.
What puzzles me is that my all 3 projects stuck at the same step. Means what? Some circleci updates?
I did provision those servers tho from my local machine with the new trellis code & trellis-cli, maybe something there?
I will keep digging, but yeah I think it’s false alarm - sorry for that.
I’m guessing it’s something on circle’s side. Maybe something caused their algorithm to go from RSA to ED25519? Either way I don’t know about CircleCI to know how to fix it off the top of my head.
Btw we recently created GitHub - roots/trellis-deploy-action: GitHub Action for deploying Trellis sites. That combined with trellis-cli’s trellis key generate should automate basically everything. But be warned, it hasn’t been extensively tested yet. I’m not sure I’d switch away from CircleCI just to try and solve this known hosts issue.
Ok, regarding Github Action I’m trying to make this work…
I hit an error with trellis key generate
[✓] GitHub private key secret set [TRELLIS_DEPLOY_SSH_PRIVATE_KEY]
[✓] GitHub deploy key added [Trellis deploy]
Error: could not set SSH known hosts. ssh-keyscan command failed.
exit status 1
But that’s not a big deal, I added it manually.
But then after workflow setup (based on example). I got this error in Github Actions
Current runner version: '2.286.0'
Operating System
Virtual Environment
Virtual Environment Provisioner
GITHUB_TOKEN Permissions
Secret source: Actions
Prepare workflow directory
Prepare all required actions
Getting action download info
Error: Unable to resolve action `roots/trellis-deploy-action@v1`, unable to find version `v1`
and I can’t find your Github Action in the Marketplace
The thought had occurred to me, so yeah can definitely do that.
What’s the folder structure for your repo look like? I realize I definitely wrote this workflow assuming the standard one, so it might need an option to set the site/trellis dir. The 3 steps that use trellis-cli at the bottom need a working-directory set in non-standard cases.
One of my first deploy attempts showed this in GH Actions:
Initializing the repository
/usr/bin/git init /home/runner/work/*project_name*/*project_name*
hint: Using 'master' as the name for the initial branch. This default branch name
hint: is subject to change. To configure the initial branch name to use in all
hint: of your new repositories, which will suppress this warning, call:
hint:
hint: git config --global init.defaultBranch <name>
hint:
hint: Names commonly chosen instead of 'master' are 'main', 'trunk' and
hint: 'development'. The just-created branch can be renamed via this command:
hint:
hint: git branch -m <name>
Initialized empty Git repository in /home/runner/work/*project_name*/*project_name*/.git/
/usr/bin/git remote add origin https://github.com/*my_org_profile*/*project_name*
In fact when I added working-directory: trellis/ to forked ver of your repo it make it work.