Skip to content

First deploy to a server fails if repo is not included to the list of known hosts  #90

@killthekitten

Description

@killthekitten

That happens pretty often, so I want to know, can we automate this.

  1. I get access to a server with ruby and a ~/projects/project_name folder.
  2. I try to deploy with an already tuned mina config.
me@my_mac ~/dev/project_name[master*]$ mina deploy
-----> Creating a temporary build path
-----> Cloning the Git repository
       Cloning into bare repository /home/hosting/projects/project_name/scm...
       Host key verification failed.
       fatal: The remote end hung up unexpectedly
 !     ERROR: Deploy failed.
-----> Cleaning up build
       Unlinking current
       OK

 !     Command failed.
       Failed with status 19

As you can see, deploy fails with Host key verification failed.
3. My fast workaround is ssh to a server, and git clone to get a prompt and add repo to the known hosts list.

hosting@fluorine:~/projects/project_name/current$ git clone git@github.com:killthekitten/project_name.git
Cloning into project_name...
The authenticity of host 'github.com (207.97.227.239)' can't be established.
RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,207.97.227.239' (RSA) to the list of known hosts.
remote: Counting objects: 1945, done.
remote: Compressing objects: 100% (941/941), done.
remote: Total 1945 (delta 1040), reused 1862 (delta 958)
Receiving objects: 100% (1945/1945), 5.47 MiB | 977 KiB/s, done.
Resolving deltas: 100% (1040/1040), done.

Can we delegate this Are you sure you want to continue connecting (yes/no)? yes prompt to a second described step instead of third?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions