Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

trellis logs for lima vm #511

Open
lukasbesch opened this issue Feb 12, 2025 · 0 comments
Open

trellis logs for lima vm #511

lukasbesch opened this issue Feb 12, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@lukasbesch
Copy link

Summary

trellis logs development should adjust (omit) the ssh user automatically when using lima.

At the moment, the ssh user is hardcoded to vagrant when the environment is development:
https://github.com/roots/trellis-cli/blob/master/trellis/ssh.go#L10-L11

It should be possible to detect vagrant or lima automatically in most cases (by looking into the .trellis directory).
If both vagrant and lima configuration is present, it probably should assume vagrant (backwards compatible).
Possibly an additional command trellis vm logs would make sense for this edge case.

Additional context

Output when running trellis logs development:

Running command => ssh [email protected] tail -f /srv/www/example/logs/*[^gz]?
[email protected]: Permission denied (publickey).
Error running ssh: exit status 255

Command needed to get the logs:

ssh example.test "tail -f /srv/www/example/logs/*[^gz]?"

Or enter the vm using trellis vm shell and tail from inside.

@lukasbesch lukasbesch added the enhancement New feature or request label Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant