-
Notifications
You must be signed in to change notification settings - Fork 1.8k
change repo_url #1227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Closing because I’m not sure this is an issue, if you are convinced that this is really a bug, please feel free to re-open the issue and add more information (your versions (Ruby, Cap, etc), your Capfile, your logs, and relevant sections out of your Gemfile) Otherwise support is done via the mailing list (https://groups.google.com/forum/#!forum/capistrano) or at StackOverflow (http://stackoverflow.com/questions/tagged/capistrano) with questions tagged |
FTR, had the same issue, found the solution on StackOverflow. |
I've run into this several times. The solution in each case is just to nuke the repo directory. This isn't an issue when it is just one server, but in one case I'm deploying to 6 servers. However, changing the repo url is rather uncommon, so it is most just an annoyance. For a workaround, try this: https://rubygems.org/gems/capistrano-git-delete_repo |
As I was reading the comments in the link above, I noted that someone suggested this: namespace :git do
task :update_repo_url do
on roles(:all) do
within repo_path do
execute :git, 'remote', 'set-url', 'origin', fetch(:repo_url)
end
end
end
end This might be worth making a standard part of the Git deployment workflow. I doubt that it would take long on deploy, and might solve this issue. |
I can't see what version of Git that was added to - I'll check the changelogs - https://git-scm.com/docs/git-remote |
@stamm Thank you! I deleted dir repo and it solved my problem! |
If I change repo_url, capistrano still clone code from old repo.
In file repo/config origin also from old repo.
I remove directory repo, and it works with new repo
The text was updated successfully, but these errors were encountered: