Wordpress 为什么capistrano在deploy.rb中忽略我的scm_命令?

Wordpress 为什么capistrano在deploy.rb中忽略我的scm_命令?,wordpress,git,capistrano,Wordpress,Git,Capistrano,我在一个共享主机上,我的git安装在与Capistrano预期的不同的位置 我在我的config/deploy.rb中使用它 set :scm_command, "/usr/local/cpanel/3rdparty/bin/git" set :local_scm_command, "/usr/local/cpanel/3rdparty/bin/git" 但我一直在犯错误: DEBUG[07fd0831] Command: ( WP_ENV=staging GIT_ASKPASS=/bin/e

我在一个共享主机上,我的git安装在与Capistrano预期的不同的位置

我在我的
config/deploy.rb中使用它

set :scm_command, "/usr/local/cpanel/3rdparty/bin/git"
set :local_scm_command, "/usr/local/cpanel/3rdparty/bin/git"
但我一直在犯错误:

DEBUG[07fd0831] Command: ( WP_ENV=staging GIT_ASKPASS=/bin/echo GIT_SSH=/home/klooddev/capistrano_tmp/bedrock-starter/git-ssh.sh /usr/bin/env git ls-remote -h git@bitbucket.org:kloodprojects/bedrock-starter.git )
DEBUG[07fd0831] Finished in 0.029 seconds with exit status 127 (failed).
DEBUG[07fd0831]     /usr/bin/env: git: No such file or directory
DEBUG[07fd0831] Finished in 0.029 seconds with exit status 127 (failed).
这就好像Capistrano忽略了我的
scm\u命令
,如果这有意义的话

set :application, 'bedrock-starter'
set :repo_url, 'git@bitbucket.org:kloodprojects/bedrock-starter.git'

# Branch options
# Prompts for the branch name (defaults to current branch)
#ask :branch, -> { `git rev-parse --abbrev-ref HEAD`.chomp }

# Hardcodes branch to always be master
# This could be overridden in a stage config file
set :branch, :master

set :deploy_to, -> { "/home/klooddev/public_html/#{fetch(:application)}" }
#
# set :deploy_via, :copy
# Use :debug for more verbose output when troubleshooting
set :log_level, :debug

# Apache users with .htaccess files:
# it needs to be added to linked_files so it persists across deploys:
set :linked_files, fetch(:linked_files, []).push('.env', 'web/.htaccess')
set :linked_files, fetch(:linked_files, []).push('.env')
set :linked_dirs, fetch(:linked_dirs, []).push('web/app/uploads')
#
set :tmp_dir, "/home/klooddev/capistrano_tmp"
#
SSHKit.config.command_map[:bash] = "/bin/bash"
SSHKit.config.command_map[:composer] = "php-cli /home/klooddev/composer.phar"
#
 set :pty, true
#
 set :scm_command, "/usr/local/cpanel/3rdparty/bin/git"
 set :local_scm_command, "/usr/local/cpanel/3rdparty/bin/git"
#
namespace :deploy do
  desc 'Restart application'
  task :restart do
    on roles(:app), in: :sequence, wait: 5 do
      # Your restart mechanism here, for example:
      # execute :service, :nginx, :reload
    end
  end
end

# The above restart task is not run by default
# Uncomment the following line to run it on deploys if needed
# after 'deploy:publishing', 'deploy:restart'

namespace :deploy do
  desc 'Update WordPress template root paths to point to the new release'
  task :update_option_paths do
    on roles(:app) do
      within fetch(:release_path) do
        if test :wp, :core, 'is-installed'
          [:stylesheet_root, :template_root].each do |option|
            # Only change the value if it's an absolute path
            # i.e. The relative path "/themes" must remain unchanged
            # Also, the option might not be set, in which case we leave it like that
            value = capture :wp, :option, :get, option, raise_on_non_zero_exit: false
            if value != '' && value != '/themes'
              execute :wp, :option, :set, option, fetch(:release_path).join('web/wp/wp-content/themes')
            end
          end
        end
      end
    end
  end
end

# The above update_option_paths task is not run by default
# Note that you need to have WP-CLI installed on your server
# Uncomment the following line to run it on deploys if needed
# after 'deploy:publishing', 'deploy:update_option_paths'

scm_命令是否可通过部署用户访问?他们是否具有适当的权限?此属性是否存在于Cap 3中?我相信scm_命令是在Cap 3中引入的,并且我的gem文件中有gem'capistrano','~>3.2.0'。我有点不确定如何判断部署用户是否可以访问scm\u命令?这是一个ruby命令,对吗?我是我机器上的管理员。