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

If remote_host has a newline, deployment fails with ssh: Could not resolve hostname #1

Open
fredvd opened this issue Mar 21, 2023 · 0 comments

Comments

@fredvd
Copy link

fredvd commented Mar 21, 2023

This is an easy error to make and hard to catch. Only if you enable debug on the run, you see that the remote_host variable only has a starting ' quote, but not an ending quote like the other variables.

In the github environment UI it is very easy and invisible if the variable has a newline. Can we add somethiing like:

https://stackoverflow.com/questions/19345872/how-to-remove-a-newline-from-a-string-in-bash

when the remote_host variable is used?

Alternatively we could also catch it in the GHA workflow file when the remote_host variable is assigned in the with: arguments, but that's repetitive boiler plate every time you use the action.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant