/ / Je ne peux pas choisir dans quelle télécommande heroku pousser mon application - ruby-on-rails, git, heroku, github

Je ne peux pas choisir dans quelle télécommande Heroku poussez mon application - ruby-on-rails, git, heroku, github

J'ajoute une application heroku appelée "myapp-production". Je pourrais pousser dans cette télécommande via git push heroku master. Bien.

J'ai créé une deuxième application sur heroku appelée "myapp-staging", et j'ajoute cette télécommande via git remote add myapp-staging git@heroku.com:myapp-staging.git.

git push heroku master semble correspondre à myapp-production.

Et quand j'essaie de git push myapp-staging, J'ai cette erreur:

Permission refusée (publickey).

fatal: Impossible de lire à partir du référentiel distant.

Assurez-vous que vous disposez des droits d'accès appropriés et que le référentiel existe.

Comment puis-je le réparer et idéalement pouvoir git push myapp-staging master et git push myapp-production master ?

git remote -v donne:

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)

Merci d'avance pour votre aide.

Réponses:

0 pour la réponse № 1

Assurez-vous que votre clé publique ssh est généralement ~/.ssh/id_rsa.pub est enregistré avec heroku. Vous pouvez vérifier cela à https://dashboard.heroku.com/account