gpt4 book ai didi

capistrano - 部署期间出现 Capifony 错误(OpenSSL::PKey::PKeyError:不是公钥 "/var/www/.ssh/id_rsa.pub")

转载 作者:行者123 更新时间:2023-12-02 06:39:26 25 4
gpt4 key购买 nike

我不断收到此错误 (OpenSSL::PKey::PKeyError: not a public key "/var/www/.ssh/id_rsa.pub")

提前致谢。

我的 deploy.rb 看起来像这样:

  set :application, "goom"
set :domain, "goom@bloom.com"
set :deploy_to, "/var/www/goom"
#set :app_path, "app"

set :repository, "/var/www/goom/.git"
set :scm, :git
set :deploy_via, :copy
# Or: `accurev`, `bzr`, `cvs`, `darcs`, `subversion`, `mercurial`, `perforce`, $

set :model_manager, "doctrine"
# Or: `propel`

role :web, domain # Your HTTP server, Apache/etc
role :app, domain # This may be the same as your$
role :db, domain, :primary => true # This is where Rails migratio$

最佳答案

原来是格式问题。最初我的公钥具有以下格式:

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "rsa-key-20101206"
AAAAB3NzaC1yc2EAAAABJQAAAQB80B66jlf+Xo3E0d6TJdojKB1mkblUCjyCaOA1
p2GpvQr+TjtCugdmh9069ybWcJCaRcvJu12pz/0iO8H0Ar/f3AiULaj6VHF9rdkA
qp+k+Ih0ep204VENqgobGfDOKfBcd2o9P1zdbCuie28tGSxoQMZNVVPMXPgl80HQ
v8+dqL4YDEvsViOMa/A1pxlvw74XwU6jzaVM+4u2ysKu0xEJzSUR4wT4s7f0zr3G
FNZDlj0vmuyggo9/3BIgtAQC9IcALqT5Jf3V5iN03+8uPUJVuy+XvIJoZJo5fnrT
zXzDBdUmjJNt+zTYsX3/fHQZOxokHPiBQQ5OTL+NW1Uscukv
---- END SSH2 PUBLIC KEY ----

将其重新格式化为以下内容即可:

ssh-rsa AAAAB3NzaC1yc2EAAAABJQAAAQB80B66jlf+Xo3E0d6TJdojKB1mkblUCjyCaOA1p2GpvQr+TjtCugdmh9069ybWcJCaRcvJu12pz/0iO8H0Ar/f3AiULaj6VHF9rdkAqp+k+Ih0ep204VENqgobGfDOKfBcd2o9P1zdbCuie28tGSxoQMZNVVPMXPgl80HQv8+dqL4YDEvsViOMa/A1pxlvw74XwU6jzaVM+4u2ysKu0xEJzSUR4wT4s7f0zr3GFNZDlj0vmuyggo9/3BIgtAQC9IcALqT5Jf3V5iN03+8uPUJVuy+XvIJoZJo5fnrTzXzDBdUmjJNt+zTYsX3/fHQZOxokHPiBQQ5OTL+NW1Uscukv

关于capistrano - 部署期间出现 Capifony 错误(OpenSSL::PKey::PKeyError:不是公钥 "/var/www/.ssh/id_rsa.pub"),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10996855/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com