我已經耗盡自己和我的資源,試圖重新創造上週我必須創造的奇蹟。EC2 Ubuntu Capistrano問題(NoMethodError:未定義方法`每個'for「publickey」:字符串)
我正在使用運行Ubuntu 12.10 x64的EC2微型實例爲使用Jenkins和Capistrano的CI創建測試服務器。
我能夠「弄清楚」我上週做了些什麼,並且似乎有一臺服務器正在工作,但發現自己無法重新建立連接到我的EC2實例,以將代碼從github推送到所述實例。
這裏是我所得到的,當我神符 「上限部署」:
[email protected]:/var/www/config$ cap deploy
* 2013年2月24日11時05分11秒執行deploy' * 2013-02-24 11:05:11 executing
部署:更新」 **交易:開始 * 2013 -02-24 11:05:11執行deploy:update_code' executing locally: "git ls-remote [email protected]:example/example.git master" command finished in 1871ms * executing "git clone -q [email protected]:example/example.git /var/www/example/releases/20130224110513 && cd /var/www/example/releases/20130224110513 && git checkout -q -b deploy de26b44bba59e1aa04dc3cf9dbec9dc4d9e4bdf3 && (echo de26b44bba59e1aa04dc3cf9dbec9dc4d9e4bdf3 > /var/www/example/releases/20130224110513/REVISION)" servers: ["example.us-west-1.compute.amazonaws.com"] *** [deploy:update_code] rolling back * executing "rm -rf /var/www/example/releases/20130224110513; true" servers: ["example.us-west-1.compute.amazonaws.com"] ** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: example.us-west-1.compute.amazonaws.com (NoMethodError: undefined method
each'for「publickey」:String) 連接失敗:example.us-west-1.compute.amazonaws.com(NoMethodError:未定義方法`each'for「publickey」 :String)
這是我的deploy.rb文件:
set :app_name, "example"
set :location, "example"
set :application, "example"
set :repository, "[email protected]:example/example.git"
set :user, "jenkins"
set :runner, "jenkins"
set :branch, "master"
set :port, 22
set :deploy_to, "/var/www/#{application}"
set :scm, "git"
ssh_options[:forward_agent] = true
ssh_options[:auth_methods] = "publickey"
ssh_options[:keys] = ["/var/www/jenkins"]
#set :default_stage, "dev"
role :app, "example.us-west-1.compute.amazonaws.com", :primary => true
我需要說明,我已經跟着其他幾個論壇和instructionals,關鍵我生成一個名爲「詹金斯」確實允許我連接到服務器,在/ var/lib中/詹金斯工作 - 這使得這個更令人困惑。
我使用的用戶詹金斯,因爲我得到了它在我的另一臺服務器上工作/它似乎會保持事情簡單與詹金斯一起使用。我對此很陌生,我一定在努力學習,我已經閱讀了幾篇文章,觀看了幾個視頻,並且非常沮喪,坦率地說,很累。有人可以幫我嗎?
嗯,這個沒有答案,我有同樣的問題! – 2013-03-12 13:40:31