Being new to Trellis I’ve been following the instructions as closely as I can. Yet I’ve found that no matter how many times I try to follow them I get different results than the previous time frequently.
I’m trying to deploy from a local development to staging and at first I got this issue, then once that was cleared I had this issue. So I destroyed my Digital Ocean Droplet and re-provisioned and now I’m getting this error. But I haven’t touched my SSH keys and every other time I’ve re-provisioned I have not received this error:
Because I know my SSH keys haven’t been modified locally, and that I added them to the DO server, I don’t know what keys it’s referring to. So I can’t regenerate them even if I want to (from my perspective).
I see the power of Trellis + Bedrock + Sage, but I feel like it’s unbelievably complicated and not stable. Be honest; do you think I’m just making mistakes or are these things likely weaknesses in Trellis / Bedrock / Sage Docs or code?
Your server may occasionally offer a different host key than what your local machine has on record in known_hosts. This could happen if you rebuild your server…
If this change in host keys is expected, then clear the old host key from your known_hosts by running the following command (with your real IP or host name). ssh-keygen -R 22.214.171.124
Thanks for the link to the troubleshooting docs @fullyint. If it’s okay with you I’d like to submit a pull request and move the “Troubleshooting” section to the beginning of the docs. I didn’t know that was there because I’m only on the “Deploys” section right now.
Now that I know I can do that I feel silly having posted some of my questions without running that first and including it’s output.
Regarding the host key change, I did clear the ssh-keygen and re-ran the script, getting the same issue. But it must have been cached somehow because I reran it a few minutes after posting this and the error disappeared and the provision continued.
Right away: every single software project has bugs and Roots’ tools are no exception. Our documentation also isn’t perfect and can’t teach people every concept either. But that doesn’t necessarily mean it’s complicated and it’s definitely not “unstable”. Plenty of people have been using all or some of our tools successfully for years and that includes us. Roots members regularly create new servers with Trellis and have no issues.
Trellis isn’t magic. Someone with next to no knowledge of these concepts could create a server by following instructions but if/when things go wrong, they won’t be able to troubleshoot properly.
You created this thread because of a lack of understanding around SSH which is completely fine and normal. This isn’t something Trellis can realistically solve unfortunately (clearing out your known hosts for example). And there’s a lot of potential issues like this.
It’s likely you are making mistakes but I can’t say for sure what exactly they are. Obviously something went wrong and that was probably compounded by troubleshooting steps which made it worse and then your code/server got into a bad state.
You’ve started 10 threads on this forum in the past 3 days which might be a record. You’ve also posted replies to existing threads. This has made it very hard for us to help you. At this point we have no idea what steps you took at any point and where you’re currently at.
I understand you’re probably frustrated with things not working and just want help. But remember that everyone on these forums is spending their own time helping others out.
Oh I hope I didn’t come off ungrateful. Everyone has been awesome. And I’m not criticisizing Roots and co. I’m just trying to share my perspective and figure out if it’s a Spencer-needs-training thing or Roots needs folks-like-Spencer (less-experienced-in-best-practices dev) to contribute to the docs to help others.
I have a couple friends and 4-5 developers that have tried Trellis and co and given up because - in their own words - it was complicated. So I think I represent a demographic. And looking at the user-base of everything Roots contrasted to other WordPress projects it seems like the adoption rate isn’t what it could be.
So this is like my 7th time trying Roots and co and I’m determined to get through to a finished project because it’s obvious that what you guys are doing is spot on, best practice, things that the entire WP community needs to adopt. But I’m hoping that sharing these 10+ specific threads about specific issues will help my staff and others that maybe aren’t as skilled or qualified as you guys (I mean that as a compliment) will be able to get on board.
I manage about 12 developers doing WordPress theming and Plugins - so my goal here is to do this successfully myself and then train them so we can all be evangelists for the project(s) and contribute to docs and core.
So if you guys will continue to be awesomely patient with me, my staff and I will be faithful contributors and help others in these forums in the future to come.
It’s not about being ungrateful and you didn’t come off that way. And I don’t care much if people criticize us
It’s two things: 1) it’s just hard to help with so much information spread around, 2) people are less likely to help when so many threads are created in a short time.
Anyway, Trellis probably is complicated for a lot of people. I solely meant that just because you’ve had some issues doesn’t necessarily mean it is. I’ve run into issues with some of the simplest software too
If/when you figure things out, we’d be more than happy if you’d contribute back to the docs to make it easier on newcomers.
I can certainly understand how a lot of spread out threads gets confusing.
I’m getting new errors just following the GitHub instructions so I’m thinking there is something fundamentally wrong with my environment. So I’m going to create a new user on my Mac and start from absolute scratch and see where that gets me.
I’ll see if I can conclude all my open threads by tomorrow and lay it all to rest.
Having about a dozen sites running on Trellis now I can tell you you’ll learn a lot of things the documentation doesn’t/can’t tell you just by sticking with it. And it gets easier to debug with every install.
Are you able to try to rule out GitLab as a compounding factor by using GitHub for these tests?
It seems to me that that basic troubleshooting steps apply: if the problem (according to the error) is GitLab, then try replacing GitLab with something else to confirm the problem lies there.
You could also confirm that GitLab has your SSH key, and that SSH forwarding is working. You mentioned you’re on a Mac; MacOS security settings require that you type ssh-add -k to forward your local ssh key when connecting to a remote server.
However! All the remote servers involved (your DO droplet and GitLab) have to agree to accept that forwarded key.
Since you said you created a new user, and regenerated your ssh key at least once (not strictly necessary because it means you’ll need to add that new key to both DO and GitLab; ssh key problems shouldn’t require regenerating your key; you should only need to make sure the remote servers you’re talking to are willing to accept your key whatever it is) you may simply be running into a key mismatch.
If this is the case, everything might actually be working as intended. Key mismatches should prevent deploys. Can you confirm that your DO droplet has your (current, new!) ssh key added to it, and that GitLab also accepts that key? You can test the latter by trying to clone your GitLab repo locally over ssh.
I think you’re partially correct by saying:[quote=“s3w47m88, post:9, topic:9328”]
in their own words - it was complicated. So I think I represent a demographic.
But that’s kind of the beauty of it. I’d like to consider myself one of dumbest people that has managed to learn Roots, and it’s definitely challenging sometimes. It takes a lot of self-research, reading through this discourse constantly, and spinning up new projects over and over until it’s basically muscle memory. By doing this I’ve also learned that 99% of the time the issue was on my end, not Root’s end.
Even then, it’s a stretch to say I’ve “learned” roots. Not one person will ever know everything about it.
I think the important thing to keep in mind is to just help the team help you as much as possible, so try to be very detailed without being overwhelming.
And when all else fails, hire them for support. Or even just when you want to understand something very thoroughly. It’s a small price to pay for all the free support and work they put towards this amazing open source tool. If you’re managing a large team running Roots I’d recommend even doing something like weekly consults and sometimes they may be cool with you recording it (so you can turn it into content, or share it with your team and new hires). It’s a very worthy investment if your want your team to run a tight ship.
Also, I keep a public cheatsheet for myself, but I must warn that I’ve too busy to keep it updated lately. So I can’t say if it’s accurate or note. I also have a quick setup tutorial. I had my friend shadow me during it who was just learning Roots so that we could do troubleshooting. Roots updates so fast that it makes it hard to keep these things updated, but you don’t have to use the most updated version. I state my exact versions I’m using so you can use older versions of everything.
Point being, this community is some of the best coders I can think of in the world (therefore very busy), so it’s only understandable things don’t work sometimes, and you have to pay for help sometimes. But if you stick with it, your Dev company will save so much money down the road, and be able to charge much higher prices. You will also become a much better developer having pushed through it.