Capifony:生产服务器上的存储库

时间:2015-12-25 14:44:56

标签: php git symfony capifony

我有 Capifony 配置:

set :application, "AppName"
set :name,        "appName"
set :domain,      "myServer"
set :deploy_to,   "/var/www/appname"
set :app_path,    "app"

ssh_options[:forward_agent] = true
default_run_options[:pty] = true

set :repository,  "git@bitbucket.org:myname/repoapp.git"
set :scm,         :git

它工作正常。但我希望从同一生产服务器 myServer (〜/ repoapp.git)上的存储库中复制文件。

像: set :repository, "myServer:~/repoapp.git"

显示错误:

    servers: ["myServer"]
    [myServer] executing command
 ** [myServer :: out] ssh: Could not resolve hostname myServer: No address associated with hostname
 ** [myServer :: out]
 ** [myServer :: out] fatal: Could not read from remote repository.
 ** [myServer :: out]
 ** [myServer :: out]
 ** Please make sure you have the correct access rights
 ** and the repository exists.

SSH配置

Host myServer
Hostname 192.241.xxx.xxx
User root
IdentityFile ~/.ssh/digital_ocean

1 个答案:

答案 0 :(得分:0)

据我所知,您希望使用位于您正在部署的同一服务器上的本地git存储库

你可以这样做

set :repository, "file:///srv/git/repoapp.git"
set :local_repository, "file://."