- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在尝试使用 capifony 通过 gitlab 从我的本地 Windows 计算机设置部署到我的服务器。
通常我会通过 ssh 连接到我的服务器并从服务器运行命令现在我想在我的本地计算机上执行此操作。
我已经在使用 git 将代码从本地计算机推送到 gitlab,即我的公钥已在 gitlab 上注册。
然而,在这里,它不适用于 capifony。可能是什么问题?
错误:
D:\Divers\Programmation\Web\foodmeup.dev>cap development deploy
** transaction: start
--> Updating code base with remote_cache strategy
*** [deploy:update_code] rolling back
** [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: my_server_ip (ArgumentError: Could not parse PKey: no start line)
connection failed for: my_server_ip (ArgumentError: Could not parse PKey: no start line)
编辑:
如果我按照几个帖子中给出的说明进行操作,并将以下选项放入我的 deploy.rb
ssh_options[:keys] = %w('~/.ssh/id_rsa')
或
ssh_options[:keys] = %w('~/.ssh/id_rsa.pub')
然后我被要求输入 root 密码,但我仍然收到错误消息(尽管我可以使用 putty 直接通过 ssh 登录,并且无需我输入 root 密码就可以与另一个用户一起从我的服务器运行部署):
D:\Divers\Programmation\Web\foodmeup.dev>cap preprod deploy
** transaction: start
--> Updating code base with remote_cache strategy
root@my_server_ip's password:
** [my_server_ip :: err] Error reading response length from authentication socket.
** [my_server_ip :: err] Permission denied (publickey).
** [my_server_ip :: err] fatal: Could not read from remote repository.
**
** Please make sure you have the correct access rights
** and the repository exists.
*** [deploy:update_code] rolling back
failed: "sh -c 'if [ -d /home/foodmeup.net/preprod/shared/cached-copy ]; then cd /home/foodmeup.net/preprod/shared/cached-copy && git fetch -q origin && git fetch --tags -q origin && git reset -q --ha
rd f52737bb09edbd968319400e2d535f467c42b04c && git clean -q -d -x -f; else git clone -q -b preprod git@gitlab.com:svassaux/foodmeup.git /home/foodmeup.net/preprod/shared/cached-copy && cd /home/foodme
up.net/preprod/shared/cached-copy && git checkout -q -b deploy f52737bb09edbd968319400e2d535f467c42b04c; fi'" on my_server_ip
最佳答案
如 this issue 中所述,一个可能的原因是:
My problem was that I needed to enclose my ssh key file location in quotes in my
config/deploy.rb
file, like this:
ssh_options[:keys] = %w('~/.ssh/id_rsa.pub')
instead of:
ssh_options[:keys] = %w(~/.ssh/id_rsa.pub)
还有:
I got this error even when I dont set
ssh_options[:keys]
in mydeploy.rb
.
或者:
This problem may be caused by ssh private key with passphrase and no ssh public key.
(也在 issues/101 中提到)
Try remove
ssh_options[:keys]
and invoke the following command:
ssh-keygen -y -f ~/.ssh/id_rsa > ~/.ssh/id_rsa.pub
这导致:
I launched ProcessMonitor and found ruby process trying to load file
~.ssh\key.pub.pub
which gave me an idea that path to the private (not public) key should be inssh_config['keys']
.So this should work:
ssh_options[:keys] = %w('~/.ssh/id_rsa')
关于git - 使用远程主机 gitlab 从 Windows 部署 capifony 时权限被拒绝(公钥),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31751669/
昨天我在服务器上进行了第 40 次或第 50 次 Symfony2 系统的部署。到目前为止一切都很好。今天我遇到了一个严重的错误。这是发生的事情: * executing `symfony:cach
我找到了一个名为 capifony 的优秀工具这在开发 symfony2 应用程序时非常有用,我想使用多阶段选项。一切正常,但我在其他阶段的数据库配置方面遇到了一个问题。 假设我们有: 3 个环境:开
我正在尝试做一个基于 capifony 和 Symfony2 的 Symfony 2 项目部署网络应用程序。 它使用 Process 触发我的“cap deploy”任务并在网络浏览器中显示我的输出。
当我cap deploy我的 Symfony2 项目,然后登录到我的服务器我看到 dev (app_dev.php) 运行正常,但 prod 版本 (app.php) 没有。 错误是 [Tue Jan
使用 capistrano 将我的开发环境部署到外部开发服务器时,我总是收到以下错误: RuntimeException: Failed to write cache file "/var/www/x
我已经将 DoctrineMigrationsBundle 安装到我的 Symfony2 应用程序,但是当我尝试部署到我的开发服务器时,我收到以下错误: Do you really want
我正在尝试使用 capifony 将我的 Symfony2 应用程序部署到我的外部托管的开发服务器,但是我收到以下错误: --> Updating code base with remote_cach
是否可以设置部署脚本,以便供应商仅在自上次更新以来 deps 文件发生更改时才更新? 最佳答案 一周前我遇到了同样的问题,我找到了解决方案。 文件 symfony2.rb(在我的服务器位于/var/l
我已将我的 Symfony2 网站部署到外部开发服务器,但是它没有从我的 github 存储库中提取 app_dev.php 文件。 app.php 已被拉出,我可以从那里访问该站点,但是如果我转到/
我在 Capistrano v2.8.0 上通过非常新的 capifony 部署时遇到问题 - 这是我的第一个 capistrano/capifony 部署。 我已经成功完成了 cap deploy:
我正在使用 Capifony 部署我的 Symfony2 应用程序,但截至今天它无法下载 composer - jenkins 输出: [32m--> Downloading Composer[0m
我目前正在使用 Symfony2 和 Gitflow 开发一个网站。我有 2 个名为“开发”、“暂存”和“生产”的外部服务器以及 Github 上的中央 GIT 存储库。 我希望使用 Capifony
我正在使用 Capifony 部署我的 Symfony2 应用程序,但截至今天它无法下载 composer - jenkins 输出: [32m--> Downloading Composer[0m
我尝试在 capifony 的帮助下部署我的 symfony2 项目 cap deploy:setup 没有问题并存储在/var/www/htdocs/symfony-project 两个文件夹 .
我正在使用 Capifony 多阶段部署将我的 Symfony2 网络应用部署到 Ubuntu 机器上的 Apache 网络服务器上,托管在 AWS 上。 我有用户设置 set :user,
我正在使用 Capifony ,Capistrano 的特定于 Symfony 的扩展。我需要覆盖其中一个预定义任务以便运行我自己的 symfony 任务 - 替换 https://github.co
我正在尝试从 Jenkins 盒子部署 Symfony2 应用程序。我正在为 2 个不同的环境使用 capifony 多阶段部署系统:dev 和 uat。 当我放 before "symfony:ca
我有一个用户 didongo (用户和组 didongo),以及 nginx 服务器(用户和组 www-data)。我已经设置 Capifony 登录为 didongo用户:我第一次部署setfacl
这可能是一个小众问题,但我希望有人能提供帮助。直到昨天,当我试图将一些更改推送到生产环境时,它一直运行良好,但从那以后,最后 3 次部署都暂时中断了实时站点。这是日志中的异常之一: [2012-12-
我正在尝试使用 capifony 部署我的 symfony 2 应用程序,我已经阅读了文档,但我似乎无法找到我的错误的解决方案。 failed: "sh -c 'git clone -q git@**
我是一名优秀的程序员,十分优秀!