herokuにアカウントを持って、別PCへ新規の開発環境を作成する手順。
元々、Macで開発を開始して、別ローカルPC(WindowsXP)にて環境構築する必要が出てきた。
とりあえず、Heroku Toolbelt をインストールして、コマンドラインから下記を実行。
C:\works>heroku login Enter your Heroku credentials. Email: xxxx@whoocus.com Password (typing will be hidden): Authentication successful.
そしてSSHキーを作成する。当然お初の環境なので、新規のPublic keyを発行する。
C:\works>heroku keys:add Could not find an existing public key. Would you like to generate one? [Yn] Y Generating new SSH public key. Uploading SSH public key C:/Documents and Settings/xxxx/.ssh/id_rsa.pub... done
すると、Windowsなので、ユーザフォルダ直下(C:\Documents and Settings\xxxx\.ssh)に、.sshフォルダ一式が作成される。
これでssh認証される。なんと簡単なことでしょう。
そして、git cloneコマンドにて、ローカルPC環境に複製する。
C:\works>git clone git@heroku.com:xxxx.git AppName Cloning into 'XXXXX'... Warning: Permanently added the RSA host key for IP address '99.99.99.999' to the list of known hosts. remote: Counting objects: 413, done. remote: Compressing objects: 100% (306/306), done. remote: Total 413 (delta 140), reused 247 (delta 69) Receiving objects: 100% (413/413), 94.00 KiB | 14 KiB/s, done. Resolving deltas: 100% (140/140), done.
これで完了。