Capistrano Deploy remote: Invalid username or password Github

折月煮酒 提交于 2019-12-25 01:36:12

问题


Trying to deploy a rails app using Capistrano, but authentication fails. The output while executing Capistrano, shows the correct IP for the server(deploy@46.101.45.52), but the logfile shows (deploy@159.65.33.89), my previous IP. I have ssh keys set on github, both for the server and the local development machine.

Capistrano log

    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:


Capistrano was deploying the app,but the app was failing server side.



来源:https://stackoverflow.com/questions/48966688/capistrano-deploy-remote-invalid-username-or-password-github

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!