更改存储库URL后,Capistrano部署失败 [英] Capistrano deploy fails after I changed the repository URL

查看:116
本文介绍了更改存储库URL后,Capistrano部署失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过capitrano从Git仓库进行简单的部署。起初我正在部署GitHub,一切都很好。但是后来我将我的存储库移动到BitBucket,现在我正在获得

 致命:无法解析对象'9cfb ...' 。 

一旦更改

  set:deploy_via,:remote_cache 

to

  set:deploy_via,:copy 

但是这不能解决问题,它只是绕过它。有没有什么办法可以告诉capistrano只是放弃旧的缓存?

解决方案

我不得不说我不知道​​,因为我没有能够测试这个,但这应该是有效的:

  cap deploy:cleanup -s keep_releases = 0 

因为它会从服务器中擦除每个版本(缓存)。



显然,您还需要删除 shared / cached-copy ,因为根据下面的评论,上述Capistrano调用似乎没有被清除。 / p>

I have a simple deployment via capistrano from a Git repository. At first I was deploying form GitHub, everything worked just fine. But then I moved my repository to BitBucket and now I'm getting

fatal: Could not parse object '9cfb...'.

The problem goes away once I change

set :deploy_via, :remote_cache

to

set :deploy_via, :copy

but that doesn't fix the problem, it only bypasses it. Is there any way I can tell capistrano to just drop the old cache?

解决方案

I gotta say I’m not sure, since I haven’t been able to test this but this should work:

cap deploy:cleanup -s keep_releases=0

Since it wipes every release (cache) from the server.

Apparently you will also need to remove shared/cached-copy, because this doesn’t seem to be cleaned by the Capistrano call above according to the comment below.

这篇关于更改存储库URL后,Capistrano部署失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆