LoginSignup
21
20

More than 5 years have passed since last update.

Herokuのアプリを別のアカウントに移管する方法

Last updated at Posted at 2015-02-25

概説

Herokuの自分のアカウントで運用していたアプリを別のアカウントに移行(権限を移動)する方法がないものかとTwitterにつぶやいたところ、Herokuエバンジェリストの @ayumin さんから「この方法でできるよ」と教えていただき、実際にやってみてうまくいったので記録を残しておきます。
herokuのアプリ移管.PNG

Herokuはアプリケーションの権限画面.PNGの画面からコラボレーターの追加.PNGを追加することで、共同開発が可能ですが、アプリの移行はこれの応用になります。

移行元アカウントでログイン

コマンド
$ heroku login

移行したいアプリのディレクトリに移動

コマンド
$ heroku git:clone -a <移行したいアプリ>
$ cd <移行したいアプリ>

コラボレーターを追加

コマンド
$ heroku sharing:add <移行先アカウント>

アプリのオーナーを移行

コマンド
$ heroku sharing:transfer <移行先アカウント> --app <移行したいアプリ>

コラボレーターを削除

「heroku sharing:transfer」を実行すると、移行元アカウントがアプリのオーナーからコラボレーターになるので、コラボレーターとしての権限が不要であれば、移行先アカウントのDashboardのAccessの画面から削除するか、もしくは、移行先アカウントでログインし、以下のコマンドでコラボレーターを削除します。

コマンド
$ heroku sharing:remove <移行元アカウント>
21
20
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
21
20