複数アカウントを利用する際は、鍵ファイルも複数アカウント分必要になる。
なので、先ず鍵を作成。
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/home/yoshiroma/.ssh/id_rsa): /home/
yoshiroma /.ssh/id_oth_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /home/yoshiroma/.ssh/id_oth_rsa.
Your public key has been saved in /home/yoshiroma/.ssh/id_oth_rsa.pub.
The key fingerprint is:
XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX:XX yoshiroma@ip-XX-XX-XX-XX
作成した鍵ファイルを使用してherokuにログインし直す
(loginコマンドの存在を知りませんでした・・・)
>heroku login
Enter your Heroku credentials.
Email:
yoshiroma@oth.com
Password (typing will be hidden):
Found the following SSH public keys:
1) id_rsa.pub
2) id_oth_rsa.pub
Which would you like to use with your Heroku account? 2
Uploading SSH public key /id_oth_rsa.pub... done
Authentication successful.
また.sshフォルダ内にconfigファイルがなければ作成し下記設定が必要
Host heroku.com
User git
port 22
Hostname heroku.com
IdentityFile ~/.ssh/id_oth_rsa
TCPKeepAlive yes
IdentitiesOnly yes
0 件のコメント:
コメントを投稿