{"id":508,"date":"2017-07-03T23:30:14","date_gmt":"2017-07-03T14:30:14","guid":{"rendered":"http:\/\/www.typea.info\/blog\/index.php\/2017\/07\/03\/gradle_ssh_reject_hostkey\/"},"modified":"2017-07-03T23:30:14","modified_gmt":"2017-07-03T14:30:14","slug":"gradle_ssh_reject_hostkey","status":"publish","type":"post","link":"https:\/\/www.typea.info\/blog\/index.php\/2017\/07\/03\/gradle_ssh_reject_hostkey\/","title":{"rendered":"Gradle ssh \u30d7\u30e9\u30b0\u30a4\u30f3\u3067 reject HostKey \u30a8\u30e9\u30fc"},"content":{"rendered":"<p><a href=\"https:\/\/www.typea.info\/blog\/index.php\/2017\/05\/07\/centos7_django_gradle\">CentOS7 \u3078\u306e Django \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30d7\u30ed\u30a4\u3092 Gradle \u3067\u534a\u81ea\u52d5\u5316<\/a> \u3057\u305f\u304c\u3001\u5225\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u63a5\u7d9a\u5148\u3092\u5909\u66f4\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc <\/p>\n<p><a href=\"https:\/\/www.amazon.co.jp\/Java%E3%83%93%E3%83%AB%E3%83%89%E3%83%84%E3%83%BC%E3%83%AB%E5%85%A5%E9%96%80-Maven-Gradle-SBT-Bazel%E5%AF%BE%E5%BF%9C\/dp\/4798049387\/ref=as_li_ss_il?ie=UTF8&amp;qid=1499092038&amp;sr=8-2&amp;keywords=gradle&amp;linkCode=li2&amp;tag=typea09-22&amp;linkId=0dadbe2a46c4d68a220cb22aa6f8c519\" target=\"_blank\"><img decoding=\"async\" src=\"\/\/ws-fe.amazon-adsystem.com\/widgets\/q?_encoding=UTF8&amp;ASIN=4798049387&amp;Format=_SL160_&amp;ID=AsinImage&amp;MarketPlace=JP&amp;ServiceVersion=20070822&amp;WS=1&amp;tag=typea09-22\" border=\"0\"><\/a><img loading=\"lazy\" decoding=\"async\" width=\"1\" height=\"1\" style=\"margin: 0px !important; border: currentcolor !important; border-image: none !important;\" alt=\"\" src=\"https:\/\/ir-jp.amazon-adsystem.com\/e\/ir?t=typea09-22&amp;l=li2&amp;o=9&amp;a=4798049387\" border=\"0\"><\/p>\n<pre class=\"prettyprint linenums\"><p>* What went wrong:\r\nExecution failed for task ':deploy'.\r\n&gt; com.jcraft.jsch.JSchException: reject HostKey: 192.168.0.35\r\n\r\n* Try:\r\nRun with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\r\n\r\nBUILD FAILED\r\n<\/p><\/pre>\n<p><a title=\"https:\/\/stackoverflow.com\/questions\/36374260\/reject-hostkey-when-deploying-jar-with-gradle-ssh-plugin\" href=\"https:\/\/stackoverflow.com\/questions\/36374260\/reject-hostkey-when-deploying-jar-with-gradle-ssh-plugin\">https:\/\/stackoverflow.com\/questions\/36374260\/reject-hostkey-when-deploying-jar-with-gradle-ssh-plugin<\/a><\/p>\n<p>ssh.settings {<br \/>&nbsp;&nbsp;&nbsp;&nbsp; knownHosts = allowAnyHosts}<\/p>\n<p>\u3092\u8ffd\u8a18\u3057\u3066\u3001\u6210\u529f<\/p>\n<pre class=\"prettyprint linenums\">task deploy {\r\n    doLast {\r\n        ssh.settings {\r\n            knownHosts = allowAnyHosts}\r\n        ssh.run {\r\n            session(remotes.web02) {\r\n                execute \"rm -R -f ${REOMOTE_PATH}\/${APP_NAME}\"\r\n                execute \"rm -f ${REOMOTE_PATH}\/${APP_NAME}.zip\"\r\n                put from:\"${projectDir}\\\\${BUID_DIR}\\\\${APP_NAME}.zip\", into:\"${REOMOTE_PATH}\/${APP_NAME}.zip\"\r\n                execute \"unzip ${REOMOTE_PATH}\/${APP_NAME}.zip -d ${REOMOTE_PATH}\"\r\n            }\r\n        }\r\n    }\r\n}\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>CentOS7 \u3078\u306e Django \u30a2\u30d7\u30ea\u30b1\u30fc\u30b7\u30e7\u30f3\u30c7\u30d7\u30ed\u30a4\u3092 Gradle \u3067\u534a\u81ea\u52d5\u5316 \u3057\u305f\u304c\u3001\u5225\u306e\u4eee\u60f3\u30de\u30b7\u30f3\u63a5\u7d9a\u5148\u3092\u5909\u66f4\u3057\u305f\u3089\u3001\u4ee5\u4e0b\u306e\u30a8\u30e9\u30fc * What went wrong: Execution failed f [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"sns_share_botton_hide":"","vkExUnit_sns_title":"","_vk_print_noindex":"","sitemap_hide":"","_veu_custom_css":"","veu_display_promotion_alert":"","vkexunit_cta_each_option":"","footnotes":""},"categories":[64,29,97],"tags":[],"class_list":["post-508","post","type-post","status-publish","format-standard","hentry","category-centos","category-django","category-gradle"],"veu_head_title_object":{"title":"","add_site_title":""},"_links":{"self":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/508","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=508"}],"version-history":[{"count":0,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/posts\/508\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=508"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=508"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.typea.info\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=508"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}