我正尝试在Dreamhost上使用Passenger和Capistrano来部署我的rails应用程序。我使用Git作为版本控制,我们从GitHub购买了一个帐户。
我已经在我的本地机器上安装了所有必需的gem、Passenger和Capistrano,并且我已经将我的项目的存储库从GitHub克隆到我的本地机器上,命名为wel。
根据Dreamhost的支持,他们的服务器上也有Passenger,Ruby,Rails等。
我目前正在为我的部署关注这篇文章http://github.com/guides/deploying-with-capistrano。
以下是我的deploy.rb。
default_run_options[:pty] = true
ssh_options[:forward_agent] = true
# be sure to change these
set :user, 'gituser'
set :domain, 'github.com'
set :application, 'MyProjectOnGit'
#git@github.com:MyProjectOnGit.git
# the rest should be good
set :repository, "git@github.com:MyProjectOnGit.git"
set :deploy_to, "/ruby.michaelsync.net/"
set :deploy_via, :remote_cache
set :scm, 'git'
set :branch, 'master'
set :git_shallow_clone, 1
set :scm_verbose, true
set :use_sudo, false
set :git_enable_submodules, 1
server domain, :app, :web
role :db, domain, :primary => true
set :ssh_options, { :forward_agent => true }
namespace :deploy do
task :restart do
run "touch #{current_path}/tmp/restart.txt"
end
end当我运行"cap deploy“时,我得到了下面的错误。
[deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: github.com (Net::SSH::AuthenticationFailed: gituser) connection failed for: github.com (Net::SSH::AuthenticationFailed: gituser)提前谢谢..
发布于 2010-05-03 16:18:44
我在-s /opt/ruby/bin/packet_worker_runner /usr/bin/packet_worker_runner中做了sudo,它解决了这个问题。
谢谢。
发布于 2010-03-15 05:30:41
不要担心,你最终会让它工作的,我曾经使用和你一样的设置……例如,Dreamhost/Passenger/Capistrano/Git (还有SVN) --这可能非常令人沮丧
以下是您要做的事情:
1)阅读以下两篇由John Nunemaker @ railstips.com撰写的文章-每次我不得不在Dreamhost上设置服务器时,我都会参考它们(第二篇是最重要的,但第一个链接给你一些非常值得遵循的技巧)
1.1) http://railstips.org/blog/archives/2008/11/23/gitn-your-shared-host-on/ 1.2) http://railstips.org/blog/archives/2008/12/14/deploying-rails-on-dreamhost-with-passenger/
2)我认为github在抱怨"gituser“--你确实在capfile中把你的用户名设置为"gituser”--我会把它改成你自己的名字。
3)你的域名是github.com --这应该是你自己的域名,而不是github...据我所知..
4)开始使用heroku
祝你好运-希望这对你有帮助,让我们知道它是否有用...
干杯
发布于 2010-03-15 05:26:52
您可以使用您的私有url来克隆您的存储库。尝试使用公共克隆URL
git://github.com/Myproject.git
https://stackoverflow.com/questions/2442636
复制相似问题