Capistrano deploy fails after I changed the repository URL

前端 未结 10 959
野性不改
野性不改 2021-01-30 01:24

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 a

10条回答
  •  忘掉有多难
    2021-01-30 01:55

    Capistrano 2.X

    Delete and re-clone the repo using the new address:

    cd $deploy_to/shared
    rm -rf cached-copy
    git clone ssh://git@example.org/new/repo.git cached-copy
    

    Modify your config/deploy.rb to use the new repo:

    set :repository, "ssh://git@example.org/new/repo.git"
    set :scm, :git
    set :deploy_via, :remote_cache
    

    Deploy again:

    cap deploy
    

    Capistrano 3.X

    1. Remove the $deploy_to/repo directory
    2. Modify your config/deploy.rb (same as 2.X)
    3. cap deploy

提交回复
热议问题