-
Notifications
You must be signed in to change notification settings - Fork 301
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
Agent is prompted to verify remote server authenticity when cloning submodule from unkown host #503
Comments
For now I have just manually added the GitHub host to the agents known hosts. |
Implemented! Will get this into a beta soon. |
Thanks for the quick fix. :) |
I seem to be hitting this problem on latest buildkite agent (3.4.0). I've got a Bitbucket repo that has a single submodule from GitHub. When it tries to update the submodules it prompts to accept the GitHub keys and so prevents the build from continuing. It doesn't fail on every build because an agent instance might have added the GitHub keys to wellknown through another pipeline job, but on newly deployed instances (AWS stack) it fails every time. Looking at the code, the problem seems to be that it uses the following command to get the submodule URLs which it then uses to update the known_hosts:
As this is run before the submodules are initialised, the foreach always returns empty and so no URLs are returned. |
Buildkite Agent Version:
When cloning a Git repo from BitBucket that has submodules in GitHub the agent is prompted to add the remote host to the known hosts:
Most of our repos are in BitBucket and cloning those works fine. It appears the agent preemptively adds the remote host to the known hosts (https://github.com/buildkite/agent/blob/master/bootstrap/bootstrap.go#L972) and things are grand. However it doesn't add submodule hosts to the known hosts. I assume if on that agent machine we had a pipeline that used GitHub for the repo, and not the submodule, that would work and then this pipeline would pass.
The text was updated successfully, but these errors were encountered: