mikeckennedy / python-for-entrepreneurs-course-demos

Contains all the "handout" materials for Talk Python's Python for Entrepreneurs course. This includes notes and the final version of the website code.
https://training.talkpython.fm/courses/explore_entrepreneurs/python-for-entrepreneurs-build-and-launch-your-online-business
MIT License
286 stars 141 forks source link

Cloning git repo onto server fails: "failed to get the hostkey for github.com" #31

Closed jboys closed 6 years ago

jboys commented 6 years ago

When cloning the forked git repo to the deployment server I receive the following error:

fatal: [167.99.175.241]: FAILED! => {
    "changed": false,
    "failed": true,
    "invocation": {
        "module_args": {
            "accept_hostkey": true,
            "bare": false,
            "clone": true,
            "depth": null,
            "dest": "/home/deployer/blueyellow",
            "executable": null,
            "force": false,
            "key_file": "/home/deployer/git_deploy_key/read_only_key",
            "recursive": true,
            "reference": null,
            "refspec": null,
            "remote": "origin",
            "repo": "ssh://git@github.com:jboys/python-for-entrepreneurs-course-demos.git",
            "ssh_opts": null,
            "track_submodules": false,
            "umask": null,
            "update": true,
            "verify_commit": false,
            "version": "HEAD"
        }
    },
    "msg": "failed to get the hostkey for github.com"
}

I have been following the deployment chapter from the course and everything up to this point is working fine.

I have double checked the deployment files and they appear to be correct; and the repo has been setup with the deploy key.

jboys commented 6 years ago

I resolved this issue by upgrading my version of Ansible (2.3 to 2.6) and correcting the code_repository value (":" should be "/").

mikeckennedy commented 6 years ago

Glad you got it working, thanks for posting your fix here. I'm sure it will help some folks.