Capistrano 仍在尝试连接到我的旧存储库
我已将存储库从 Cadaset.com 更改为 Github.com,并将 deploy.rb
文件中的存储库设置更改为新的 Github 存储库。
当我运行 cap deploy
时,它仍然尝试连接到 Codaset.com 上的旧存储库。
我找不到任何对我的旧仓库的引用,所以不明白它为什么这样做。
我已经尝试过
cap deploy:setup
,但后来我得到了同样的错误
cap deploy
I have changed my repo to Github.com from Cadaset.com and changed the repository setting in my deploy.rb
file to my new Github repo.
When I run cap deploy
it still tries to connect to my old repo on Codaset.com.
I cant find any reference to my old repo so cant see why it is doing this.
I have tried
cap deploy:setup
that works but then I get the same error on
cap deploy
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您必须删除服务器上存储在
PATH_TO_APP/shared/cached-copy
中的共享副本。删除cached-copy
目录并再次运行部署。cached-copy
文件夹包含 Git 存储库的克隆。当克隆存在时,Capistrano 不会再次克隆它,而只是运行git fetch
。You have to delete the shared copy on your server stored at
PATH_TO_APP/shared/cached-copy
. Remove thecached-copy
directory and run the deploy again.The
cached-copy
folder contains a clone of your Git repository. When the clone exists, Capistrano doesn't clone it again and simply runs agit fetch
.如果 Simone 的答案不适合您,您可能需要手动编辑服务器上的
.git/config
文件以反映新“来源”的位置。查看本地计算机上应用程序项目中的源,并将源块镜像到服务器上“当前”文件夹中的.git/config
中。这对我有用。原始块看起来像
If Simone's answer doesn't do it for you, you may have to manually edit your
.git/config
file on your server to reflect the location of the new 'origin'. Have a look at your origin in your application project on your local machine, and mirror the origin block in the.git/config
in the 'current' folder on your server. This worked for me.The origin block will look something like