riboseinc / jekyll-theme-open-project

Jekyll theme for site suite presenting your open software and specifications.
MIT License
30 stars 3 forks source link

CI build failure due to host key verification during git clone #11

Closed strogonoff closed 6 years ago

strogonoff commented 6 years ago

This happens on CI only, presumably because SSH is paranoid seeing github.com for the first time:

$ bundle exec jekyll build
Configuration file: /builds/strogonoff/hub.ro.dev.anton.strogonoff.name/_config.yml
 Theme Config file: /usr/local/bundle/gems/jekyll-theme-open-project-1.0.0.pre5/_config.yml
            Source: /builds/strogonoff/hub.ro.dev.anton.strogonoff.name
       Destination: /builds/strogonoff/hub.ro.dev.anton.strogonoff.name/_site
 Incremental build: disabled. Enable with --incremental
      Generating... 
Invalid theme folder: _data
jekyll 3.8.3 | Error:  git '--git-dir=/builds/strogonoff/hub.ro.dev.anton.strogonoff.name/_projects/Metanorma/.git' '--work-tree=/builds/strogonoff/hub.ro.dev.anton.strogonoff.name/_projects/Metanorma' fetch 'origin'  2>&1:Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
ERROR: Job failed: exit code 1

The workaround should be something along the lines of:

git config --global core.sshCommand ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no

This would be insecure so if this is successful another issue will follow to resolve this long term in a secure way.

strogonoff commented 6 years ago

Resolved in latest version.