Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
secret hosts aren't possible #7043
I tried doing something like this (which I agree isn't necessary - but I thought it was better to not to broadcast machine names I don't admin):
addons: ssh_known_hosts: secure: "..."
but the log shows:
Which again - for me isn't a huge deal - I just thought you might like to know.
+1, I'd like to use a repository environment variable
. . . addons: ssh_known_hosts: $DEPLOY_HOST . . .
And the resulting travis build log:
. . . $ ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H \$DEPLOY_HOST 2>&1 | tee -a $HOME/.ssh/known_hosts getaddrinfo $DEPLOY_HOST: Name or service not known . . .
Putting quotes around
but like I stated in the original description - this doesn't really help. Looking in the log on travis will tell you what the host is...
referenced this issue
Sep 9, 2017
@BanzaiMan from what I've found, this is the only command that is executed regarding adding the known host:
In my current project, I've added that line manually in the
before_deploy: # or anywhere before the secret ssh host is needed - ssh-keyscan -t $TRAVIS_SSH_KEY_TYPES -H $DEPLOY_HOST 2>&1 | tee -a $HOME/.ssh/known_hosts
@rgetz The work will have to be prioritized, but I cannot say when that may happen.
You can add the host key with the secret as I mentioned above. If you need this host to check out code, you would also need to take some extra steps to check out the code, too.
added a commit
Jan 2, 2018
Thanks for contributing to this issue. As it has been 90 days since the last activity, we are automatically closing the issue. This is often because the request was already solved in some way and it just wasn't updated or it's no longer applicable. If that's not the case, please do feel free to either reopen this issue or open a new one. We'll gladly take a look again! You can read more here: https://blog.travis-ci.com/2018-03-09-closing-old-issues