0

我正在尝试将我的 rails 项目部署到子域中,但是在运行 cap deploy时出现以下错误

 [Deprecation Warning] This API has changed, please hook `deploy:create_symlink` instead of `deploy:symlink`.
 * 2013-09-27 21:14:44 executing `deploy'
 * 2013-09-27 21:14:44 executing `deploy:update'
 ** transaction: start
 * 2013-09-27 21:14:44 executing `deploy:update_code'
executing locally: "git ls-remote git@github.com:anveshnarepo/techzoo.git master"
 Permission denied (publickey).
 fatal: The remote end hung up unexpectedly
 *** [deploy:update_code] rolling back
 * executing "rm -rf /var/www/anveshnatech.com/public_html/edupdu/releases/20130927154447; true"
servers: ["http://anveshnatech.com/edupdu/www"]
 ** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: http://anveshnatech.com/edupdu/www (SocketError: getaddrinfo: Name or service not known)
 Command git ls-remote git@github.com:anveshnarepo/techzoo.git master returned status code pid 12392 exit 128

如果我试图运行cap deploy:setup它会显示如下内容:

[Deprecation Warning] This API has changed, please hook `deploy:create_symlink` instead of `deploy:symlink`.
* 2013-09-27 21:23:57 executing `deploy:setup'
* executing "mkdir -p /var/www/anveshnatech.com/public_html/edupdu     /var/www/anveshnatech.com/public_html/edupdu/releases    /var/www/anveshnatech.com/public_html/edupdu/shared /var/www/anveshnatech.com/public_html/edupdu/shared/system /var/www/anveshnatech.com/public_html/edupdu/shared/log /var/www/anveshnatech.com/public_html/edupdu/shared/pids"
servers: ["http://anveshnatech.com/edupdu/www"]
connection failed for: http://anveshnatech.com/edupdu/www (SocketError: getaddrinfo: Name or service not known)

如何解决这个问题?

4

1 回答 1

0

一个错误是您定义了主机应该去的 URI。我怀疑你有

role :app, "http://anveshnatech.com/edupdu/www" 

在您的 capfile 中,当您需要以下内容时:

role :app, "anveshnatech.com"

或(示例)

role :app, "10.1.1.1" 

这些可能不是唯一的错误,您的 git 密钥存在一些权限问题,以及弃用警告的一些奇怪之处。

于 2013-10-01T20:41:26.027 回答