練功房推薦書單

  • 猛虎出柙雙劍合璧版--最新 OCA / OCP Java SE 7 Programmer 專業認證 (電子書)
  • 流浪教師存零股存到3000萬(全新增修版)(書+DVD)
  • 開始在關西自助旅行(京都‧大阪‧神戶‧奈良)(全新增訂版)
  • 不敗教主的300張股票存股術

解決Hudson透過SFTP上傳時出現的The authenticity of host '10.66.19.16' can't be established. RSS feed
Forum Index » 軟體開發專案管理 Software Development Project Management
Author Message
andowson

七段學員
[Avatar]

Joined: 2007/1/2
Messages: 709
Location: 台北
Offline
透過Hudson自動建構Maven專案時,如果想要透過SFTP將檔案上傳到應用伺服器去,可以透過Maven Wagon Upload plugin來自動上傳,如果是手動下命令(mvn clean package wagon:upload)時可以自己打yes,但是如果透過Hudson自動執行時,無法Build結束,導致Hudson的log檔被撐爆,裡面不斷被寫入類似下面的訊息:
The authenticity of host '10.66.19.16' can't be established.
RSA key fingerprint is 1e:8e:82:dd:18:92:50:50:d0:3c:51:ff:39:1c:ef:6c.
Are you sure you want to continue connecting? (yes/no):


解決方法就是自己手動建立.ssh目錄及know_hosts檔案,並將對方伺服器的key值填入即可:
mkdir /var/lib/hudson/.ssh
cat /root/.ssh/known_hosts |grep 10.66.19.16 >> /var/lib/hudson/.ssh/known_hosts
chown -R hudson:hudson /var/lib/hudson/.ssh


參考資料
http://mojo.codehaus.org/wagon-maven-plugin/upload-mojo.html

分享經驗 累積智慧
[WWW]
lisaturan

十級學員

Joined: 2019/12/14
Messages: 1
Location: United States
Offline
thank you guys smilie smilie smilie
[WWW]
 
Forum Index » 軟體開發專案管理 Software Development Project Management
Go to:   
Mobile view