Capistrano git:检查失败的退出状态128

时间:2014-05-17 14:31:48

标签: ruby-on-rails-4 capistrano

我跑cap production git:check时得到了这个。 (我拿出了我的真实IP地址和用户名)

DEBUG [4d1face0] Running /usr/bin/env git ls-remote -h foo@114.215.183.110:~/git/deepot.git on 114.***.***.***
DEBUG [4d1face0] Command: ( GIT_ASKPASS=/bin/echo GIT_SSH=/tmp/deepot/git-ssh.sh /usr/bin/env git ls-remote -h foo@114.***.***.***:~/git/deepot.git )
DEBUG [4d1face0]        Error reading response length from authentication socket.
DEBUG [4d1face0]        Permission denied (publickey,password).
DEBUG [4d1face0]        fatal: The remote end hung up unexpectedly
DEBUG [4d1face0] Finished in 0.715 seconds with exit status 128 (failed).

以下是我的部署文件......

set :user, 'foo'
set :domain, '114.***.***.***'
set :application, 'deepot'

set :repo_url, 'foo@114.***.***.***:~/git/deepot.git'

set :deploy_to, '/home/#{fetch(:user)}/local/#{fetch(:application)}'

set :linked_files, %w{config/database.yml config/bmap.yml config/cloudinary.yml config/environments/development.rb config/environments/production.rb}

以下是我的produ.rb ...

role :app, %w{foo@114.***.***.***}
role :web, %w{foo@114.***.***.***}
role :db,  %w{foo@114.***.***.***}

server '114.***.***.***', user: 'foo', roles: %w{web app}, ssh_options: {keys: %w{/c/Users/Administrator/.ssh/id_rsa}, auth_methods: %w(publickey)}

我可以成功地使用git bash输入我的foo@114.***.***.***而不输入任何密码。 (我是Windows 7机器和部署服务器是ubuntu 12.04)

任何帮助将不胜感激。谢谢!

1 个答案:

答案 0 :(得分:4)

尝试生成新的私钥/公钥par并为其提供密码。如果它有效,问题是你当前的密钥不使用密码短语。