1

我正在尝试按照此处说明的步骤使用 edeliver 发布 phoenix 应用程序。我浏览了互联网,发现有些人有同样的问题,但无论我做什么,我都会在下面遇到同样的错误。

  • 我可以使用 SSH 无密码登录
  • 我的用户(部署)拥有所有权利
  • 用户可以通过 ssh 使用 git

错误信息:

-----> Authorizing hosts
-----> Ensuring hosts are ready to accept git pushes
A remote command failed on:

deploy@206.189.109.156

Output of the command is shown above and the command executed
on that host is printed below for debugging purposes:

FAILED with exit status 255:

current_shell="$0" || :
[ -z "$current_shell" ] && current_shell="$SHELL"
case "$current_shell" in
  (*bash*) echo 'bash is installed and the default shell'  ;;
  (*zsh*)  echo  'zsh is installed and the default shell'  ;;
  (*)
   echo
   echo "You are using an unsupported shell: '$current_shell'"
   echo "edeliver requires either bash or zsh to be installed"
   echo "and the default shell for the build user 'deploy'"
   echo "on your build host: '206.189.109.156'."
   exit 1
   ;;
esac
set -e
if [ ! -d ~/myapps/builds ]
then
  mkdir -p ~/myapps/builds
  cd ~/myapps/builds
  git init
  git config receive.denyCurrentBranch ignore
else
  cd ~/myapps/builds
  git config receive.denyCurrentBranch ignore
fi

这是我的 .deliver/config 文件:

APP="boomgaard"
BUILD_HOST="206.189.109.156"
BUILD_USER="deploy"
BUILD_AT="~/myapps/builds"

RELEASE_DIR="~/myapps/builds/"
# prevent re-installing node modules; this defaults to "."
GIT_CLEAN_PATHS="_build rel priv/static"

# STAGING_HOSTS="206.189.109.156"
# STAGING_USER="deploy"
# TEST_AT="/home/deploy/staging"

PRODUCTION_HOSTS="fruitvarieteiten.com"
PRODUCTION_USER="deploy"
DELIVER_TO="/home/deploy"

# For *Phoenix* projects, symlink prod.secret.exs to our tmp source
pre_erlang_get_and_update_deps() {
local _prod_secret_path="/home/deploy/prod.secret.exs"
if [ "$TARGET_MIX_ENV" = "prod" ]; then
__sync_remote "
  ln -sfn '$_prod_secret_path' '$BUILD_AT/config/prod.secret.exs'
"
fi
}

pre_erlang_clean_compile() {
 status "Running phoenix.digest" # log output prepended with "----->"
 __sync_remote " # runs the commands on the build host
# [ -f ~/.profile ] && source ~/.profile # load profile (optional)
source ~/.profile
# echo \$PATH # check if rbenv is in the path
set -e # fail if any command fails (recommended)
cd '$BUILD_AT' # enter the build directory on the build host (required)
# prepare something
mkdir -p priv/static # required by the phoenix.digest task
npm install

./node_modules/brunch/bin/brunch build --production
cd
# run your custom task
APP='$APP' MIX_ENV='$TARGET_MIX_ENV' $MIX_CMD phoenix.digest $SILENCE
4

0 回答 0