使用git更改存储库时的Capistrano错误 [英] Capistrano error when change repository using git
问题描述
我通过Capistrano从Git存储库进行了简单的部署。
I have a simple deployment via capistrano from a Git repository.
我想更改正在使用的存储库,所以我基本上只是更改了
I wanted to change the repository I was working with so I basically just changed
set:存储库, git@github.com:new_repository
set :repository, "git@github.com:new_repository"
但是部署时出现以下错误:
But i get the following error when deploying:
致命:无法解析对象'9cfb ...'。
fatal: Could not parse object '9cfb...'.
一旦我更改,问题就消失了
The problem goes away once I change
set:deploy_via,:remote_cache
set :deploy_via, :remote_cache
至
set:deploy_via,:copy
set :deploy_via, :copy
我也尝试了deploy:cleanup,但是出现以下错误:
I also tried deploy:cleanup but I get the following error:
* deploy:cleanup'是仅在与{:except => {:no_release => true}}匹配的服务器上运行,但没有与之匹配的服务器*
*`deploy:cleanup' is only run for servers matching {:except=>{:no_release=>true}}, but no servers matched*
任何想法我如何使remote_cache再次正常工作?
Any idea how could i get remote_cache working again?
谢谢!
推荐答案
使用capistrano 3,避免删除回购文件夹:
With capistrano 3, to avoid deleting the repo folder :
-
在您的
config / deploy中更改回购URL。 rb
,因为OP已经完成
SSH到您的服务器内部,并更改了git repo的远程URL:
SSH to your server inside and change the remote URL of the git repo :
ssh user@server.com
# Go the capistrano deploy root
cd /capistrano/deploy/root/folder
# Go inside the folder names *repo*
cd repo
# Manually change the git remote
git remote set-url origin ...
这篇关于使用git更改存储库时的Capistrano错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!