「myapp-production」というherokuアプリを追加します。経由でこのリモートをプッシュできます git push heroku master
。ファイン。
「myapp-staging」と呼ばれる2番目のアプリをherokuに作成し、このリモートを経由して追加します git remote add myapp-staging git@heroku.com:myapp-staging.git
.
git push heroku master
myapp-productionに対応しているようです。
そして私がしようとすると git push myapp-staging
、私はこのエラーがあります:
許可が拒否されました(publickey)。
fatal:リモートリポジトリから読み込めませんでした。
正しいアクセス権があり、リポジトリが存在することを確認してください。
どうすれば修正でき、理想的には git push myapp-staging master
そして git push myapp-production master
?
git remote -v
与える:
myapp-staging git@heroku.com:myapp-staging.git (fetch)
myapp-staging git@heroku.com:myapp-staging.git (push)
heroku https://git.heroku.com/myapp-production.git (fetch)
heroku https://git.heroku.com/myapp-production.git (push)
origin git@github.com:johndoe/myapp.git (fetch)
origin git@github.com:johndoe/myapp.git (push)
よろしくお願いします。
回答:
回答№1は0通常、ssh公開キーを確認してください ~/.ssh/id_rsa.pub
herokuに登録されています。で確認できます https://dashboard.heroku.com/account