Capistrano Deploy remote:无效的用户名或密码Github

时间:2018-02-24 19:20:38

标签: ruby-on-rails-4 github capistrano

尝试使用Capistrano部署rails应用程序,但身份验证失败。执行Capistrano时的输出显示服务器的正确IP(deploy@46.101.45.52),但日志文件显示(deploy@159.65.33.89),我以前的IP。我在github上设置了ssh密钥,用于服务器和本地开发机器。

Capistrano日志

    DEBUG [deb63a13] Command: ( export GIT_ASKPASS="/bin/echo" GIT_SSH="/tmp/git-ssh-geofly-production-david.sh" ; /usr/bin/env git ls-remote https://github.com/uberdave/geofly.me.git HEAD )
 DEBUG [deb63a13]   remote: Invalid username or password.
 DEBUG [deb63a13]   f
 DEBUG [deb63a13]   atal: 
 DEBUG [deb63a13]   A
 DEBUG [deb63a13]   uthentication failed for '
 DEBUG [deb63a13]   h
 DEBUG [deb63a13]   ttps://github.com/uberdave/geofly.me.git/

Capfile

set :rvm_type, :user
set :rvm_ruby_version, '2.5.0'

# Load DSL and set up stages
require "capistrano/setup"
# Include default deployment tasks
require "capistrano/deploy"
require  'capistrano/bundler'
require 'capistrano/rails'

require 'capistrano/rvm'
require 'capistrano/passenger'


# Load the SCM plugin appropriate to your project:
#
# require "capistrano/scm/hg"
# install_plugin Capistrano::SCM::Hg
# or
# require "capistrano/scm/svn"
# install_plugin Capistrano::SCM::Svn
# or
require "capistrano/scm/git"
install_plugin Capistrano::SCM::Git
Dir.glob("lib/capistrano/tasks/*.rake").each { |r| import r }

deploy.rb

 # config valid for current version and patch releases of Capistrano

lock "~> 3.10.1"



 set :passenger_restart_with_touch, false

set :application, "geofly"

set :repo_url, "git@github.com:uberdave/geofly.git"

#"ssh://github.com:uberdave/geofly.me.git"

#https://github.com/uberdave/geofly.me.git



set :deploy_to, '/home/deploy/geofly'



append :linked_files, "config/database.yml", "config/secrets.yml"

append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "vendor/bundle", "public/system", "public/uploads"

production.rb

server '46.101.45.52', user: 'deploy', roles: %w{app db web}

1 个答案:

答案 0 :(得分:0)

Capistrano正在部署该应用程序,但该应用程序在服务器端失败。