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

Need better messages when git clone fails #2

Open
dpoirier opened this issue Apr 11, 2016 · 1 comment
Open

Need better messages when git clone fails #2

dpoirier opened this issue Apr 11, 2016 · 1 comment

Comments

@dpoirier
Copy link
Contributor

If the repo is private and we try to clone it with an https: URL (instead of using a git URL and providing a key file), then ansible just hangs with no indication of what's going on. Maybe git is prompting or something; who knows?

If the branch we're trying to checkout doesn't exist, ansible just tells us the checkout failed, but not why.

There's also a warning in the docs (http://docs.ansible.com/ansible/git_module.html): "If the task seems to be hanging, first verify remote host is in known_hosts. SSH will prompt user to authorize the first contact with a remote host. To avoid this prompt, one solution is to add the remote host public key in /etc/ssh/ssh_known_hosts before calling the git module, with the following command: ssh-keyscan -H remote_host.com >> /etc/ssh/ssh_known_hosts.". -- It would be nice if we could find a way for that to fail with a useful message instead of hanging.

@dpoirier
Copy link
Contributor Author

It looks like adding ssh_opts="-o StrictHostKeyChecking=no" to our git tasks might avoid one problem.

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