-
Notifications
You must be signed in to change notification settings - Fork 492
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Git password prompt does not work with "mina deploy" #41
Comments
It works without the deploy helpers. Maybe it's because of isolate or erb? desc "Deploys the current version to the server."
task :deploy do
queue %Q{# Go to the deploy path
cd "#{settings.deploy_to!}" || (
echo "! ERROR: not set up."
echo "The path '#{settings.deploy_to!}' is not accessible on the server."
echo "You may need to run 'mina setup' first."
false
) || exit 15
# Check releases path
if [ ! -d "#{settings.releases_path!}" ]; then
echo "! ERROR: not set up."
echo "The directory '#{settings.releases_path!}' does not exist on the server."
echo "You may need to run 'mina setup' first."
exit 16
fi
# Check lockfile
if [ -e "#{settings.lock_file!}" ]; then
echo "! ERROR: another deployment is ongoing."
echo "The file '#{settings.lock_file!}' was found."
echo "If no other deployment is ongoing, delete the file to continue."
exit 17
fi
# Determine $previous_path and other variables
[ -h "#{settings.current_path!}" ] && [ -d "#{settings.current_path!}" ] && previous_path=$(cd "#{settings.current_path!}" >/dev/null && pwd -LP)
build_path="./tmp/build-`date +%s`$RANDOM"
version=$((`cat "#{settings.deploy_to!}/last_version" 2>/dev/null`+1))
release_path="#{settings.releases_path!}/$version"
# Sanity check
if [ -e "$build_path" ]; then
echo "! ERROR: Path already exists."
exit 18
fi
# Bootstrap script (in deployer)
(
echo "-----> Creating a temporary build path"
#{echo_cmd %[touch "#{settings.lock_file!}"]} &&
#{echo_cmd %[mkdir -p "$build_path"]} &&
#{echo_cmd %[cd "$build_path"]} &&
(
}
invoke :'git:clone'
invoke :'deploy:link_shared_paths'
invoke :'bundle:install'
#invoke :'rails:db_migrate'
queue %Q{
)
) &&
#
# Rename to the real release path, then symlink 'current'
(
echo "-----> Build finished"
echo "-----> Moving build to $release_path"
#{echo_cmd %[mv "$build_path" "$release_path"]} &&
echo "-----> Updating the #{settings.current_path!} symlink" &&
#{echo_cmd %[ln -nfs "$release_path" "#{settings.current_path!}"]}
) &&
# ============================
# === Start up serve => (in deployer)
(
echo "-----> Launching"
#{echo_cmd %[cd "$release_path"]}
}
queue %Q{
) &&
# ============================
# === Complete & unlock
(
rm -f "#{settings.lock_file!}"
echo "$version" > "./last_version"
echo "-----> Done. Deployed v$version"
) ||
# ============================
# === Failed deployment
(
echo "! ERROR: Deploy failed."
}
queue %Q{
echo "-----> Cleaning up build"
[ -e "$build_path" ] && (
#{echo_cmd %[rm -rf "$build_path"]}
)
[ -e "$release_path" ] && (
echo "Deleting release"
#{echo_cmd %[rm -rf "$release_path"]}
)
(
echo "Unlinking current"
[ -n "$previous_path" ] && #{echo_cmd %[ln -nfs "$previous_path" "#{settings.current_path!}"]}
)
# Unlock
#{echo_cmd %[rm -f "#{settings.lock_file!}"]}
echo "OK"
exit 19
)
}
end |
It's because of One workaround is to use |
Ok, thanks. In any case it should be documented somewhere what the different term modes do and what that's means for the deployment helper. |
BTW, without term_mode set to nil, the mina setup may need one more enter press and still show password failed error, could there be a more pretty way for both password input and good-look color? |
thanks @rstacruz ! That indeed fixed the issue! |
set :forward_agent, true |
set :execution_mode, :system |
When i run "mina git:clone" the git password prompt works fine. But with "mina deploy" it does not prompt for the git password and the cloning fails.
I use revision 2033592
The text was updated successfully, but these errors were encountered: