Cant push to Heroku from different machine










1















I cloned the repo from the URL mentioned in the dashboard settings in Heroku to a Windows machine. After committing changes, attempting to push to Heroku fails.



=> git push heroku master

fatal: 'heroku' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.


I followed some instructions from here, and now I am getting



=> git push heroku master

The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxx/o.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'heroku.com,xx.xx.xx.xx' (RSA) to the list of known hosts.
git@heroku.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.









share|improve this question




























    1















    I cloned the repo from the URL mentioned in the dashboard settings in Heroku to a Windows machine. After committing changes, attempting to push to Heroku fails.



    => git push heroku master

    fatal: 'heroku' does not appear to be a git repository
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.


    I followed some instructions from here, and now I am getting



    => git push heroku master

    The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
    RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxx/o.
    Are you sure you want to continue connecting (yes/no)? yes
    Warning: Permanently added 'heroku.com,xx.xx.xx.xx' (RSA) to the list of known hosts.
    git@heroku.com: Permission denied (publickey).
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.









    share|improve this question


























      1












      1








      1








      I cloned the repo from the URL mentioned in the dashboard settings in Heroku to a Windows machine. After committing changes, attempting to push to Heroku fails.



      => git push heroku master

      fatal: 'heroku' does not appear to be a git repository
      fatal: Could not read from remote repository.

      Please make sure you have the correct access rights
      and the repository exists.


      I followed some instructions from here, and now I am getting



      => git push heroku master

      The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
      RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxx/o.
      Are you sure you want to continue connecting (yes/no)? yes
      Warning: Permanently added 'heroku.com,xx.xx.xx.xx' (RSA) to the list of known hosts.
      git@heroku.com: Permission denied (publickey).
      fatal: Could not read from remote repository.

      Please make sure you have the correct access rights
      and the repository exists.









      share|improve this question
















      I cloned the repo from the URL mentioned in the dashboard settings in Heroku to a Windows machine. After committing changes, attempting to push to Heroku fails.



      => git push heroku master

      fatal: 'heroku' does not appear to be a git repository
      fatal: Could not read from remote repository.

      Please make sure you have the correct access rights
      and the repository exists.


      I followed some instructions from here, and now I am getting



      => git push heroku master

      The authenticity of host 'heroku.com (50.19.85.156)' can't be established.
      RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxx/o.
      Are you sure you want to continue connecting (yes/no)? yes
      Warning: Permanently added 'heroku.com,xx.xx.xx.xx' (RSA) to the list of known hosts.
      git@heroku.com: Permission denied (publickey).
      fatal: Could not read from remote repository.

      Please make sure you have the correct access rights
      and the repository exists.






      ruby-on-rails git heroku ruby-on-rails-5 heroku-cli






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Nov 15 '18 at 21:35









      mrzasa

      10.6k104078




      10.6k104078










      asked Nov 15 '18 at 16:22









      arjunarjun

      851620




      851620






















          2 Answers
          2






          active

          oldest

          votes


















          1














          Heroku git authenticates you using public keys that are added with heroku keys:add. You have to have a separate private/public SSH key pair for each machine you're working on.



          Add a new key with heroku keys:add



          And then verify it works with ssh -v git@heroku.com



          https://devcenter.heroku.com/articles/keys#adding-keys-to-heroku






          share|improve this answer






























            0














            Firstly, make sure you're logged into heroku:




            heroku login


            Enter your credentials.



            It's common to get this error when using a cloned git repo onto a new machine. Even if your heroku credentials are already on the machine, there is no link between the cloned repo and heroku locally yet. To do this, cd into the root dir of the cloned repo and run




            heroku git:remote -a yourapp


            Now it's work perfectly, If you get any error regarding SSH Keys, You should check your BitBucket or GitHub public keys.






            share|improve this answer






















              Your Answer






              StackExchange.ifUsing("editor", function ()
              StackExchange.using("externalEditor", function ()
              StackExchange.using("snippets", function ()
              StackExchange.snippets.init();
              );
              );
              , "code-snippets");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "1"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              autoActivateHeartbeat: false,
              convertImagesToLinks: true,
              noModals: true,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: 10,
              bindNavPrevention: true,
              postfix: "",
              imageUploader:
              brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
              contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
              allowUrls: true
              ,
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );













              draft saved

              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53323764%2fcant-push-to-heroku-from-different-machine%23new-answer', 'question_page');

              );

              Post as a guest















              Required, but never shown

























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes









              1














              Heroku git authenticates you using public keys that are added with heroku keys:add. You have to have a separate private/public SSH key pair for each machine you're working on.



              Add a new key with heroku keys:add



              And then verify it works with ssh -v git@heroku.com



              https://devcenter.heroku.com/articles/keys#adding-keys-to-heroku






              share|improve this answer



























                1














                Heroku git authenticates you using public keys that are added with heroku keys:add. You have to have a separate private/public SSH key pair for each machine you're working on.



                Add a new key with heroku keys:add



                And then verify it works with ssh -v git@heroku.com



                https://devcenter.heroku.com/articles/keys#adding-keys-to-heroku






                share|improve this answer

























                  1












                  1








                  1







                  Heroku git authenticates you using public keys that are added with heroku keys:add. You have to have a separate private/public SSH key pair for each machine you're working on.



                  Add a new key with heroku keys:add



                  And then verify it works with ssh -v git@heroku.com



                  https://devcenter.heroku.com/articles/keys#adding-keys-to-heroku






                  share|improve this answer













                  Heroku git authenticates you using public keys that are added with heroku keys:add. You have to have a separate private/public SSH key pair for each machine you're working on.



                  Add a new key with heroku keys:add



                  And then verify it works with ssh -v git@heroku.com



                  https://devcenter.heroku.com/articles/keys#adding-keys-to-heroku







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Nov 15 '18 at 16:44









                  mrzasamrzasa

                  10.6k104078




                  10.6k104078























                      0














                      Firstly, make sure you're logged into heroku:




                      heroku login


                      Enter your credentials.



                      It's common to get this error when using a cloned git repo onto a new machine. Even if your heroku credentials are already on the machine, there is no link between the cloned repo and heroku locally yet. To do this, cd into the root dir of the cloned repo and run




                      heroku git:remote -a yourapp


                      Now it's work perfectly, If you get any error regarding SSH Keys, You should check your BitBucket or GitHub public keys.






                      share|improve this answer



























                        0














                        Firstly, make sure you're logged into heroku:




                        heroku login


                        Enter your credentials.



                        It's common to get this error when using a cloned git repo onto a new machine. Even if your heroku credentials are already on the machine, there is no link between the cloned repo and heroku locally yet. To do this, cd into the root dir of the cloned repo and run




                        heroku git:remote -a yourapp


                        Now it's work perfectly, If you get any error regarding SSH Keys, You should check your BitBucket or GitHub public keys.






                        share|improve this answer

























                          0












                          0








                          0







                          Firstly, make sure you're logged into heroku:




                          heroku login


                          Enter your credentials.



                          It's common to get this error when using a cloned git repo onto a new machine. Even if your heroku credentials are already on the machine, there is no link between the cloned repo and heroku locally yet. To do this, cd into the root dir of the cloned repo and run




                          heroku git:remote -a yourapp


                          Now it's work perfectly, If you get any error regarding SSH Keys, You should check your BitBucket or GitHub public keys.






                          share|improve this answer













                          Firstly, make sure you're logged into heroku:




                          heroku login


                          Enter your credentials.



                          It's common to get this error when using a cloned git repo onto a new machine. Even if your heroku credentials are already on the machine, there is no link between the cloned repo and heroku locally yet. To do this, cd into the root dir of the cloned repo and run




                          heroku git:remote -a yourapp


                          Now it's work perfectly, If you get any error regarding SSH Keys, You should check your BitBucket or GitHub public keys.







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered Nov 30 '18 at 11:56









                          Ayush KanoongoAyush Kanoongo

                          412




                          412



























                              draft saved

                              draft discarded
















































                              Thanks for contributing an answer to Stack Overflow!


                              • Please be sure to answer the question. Provide details and share your research!

                              But avoid


                              • Asking for help, clarification, or responding to other answers.

                              • Making statements based on opinion; back them up with references or personal experience.

                              To learn more, see our tips on writing great answers.




                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53323764%2fcant-push-to-heroku-from-different-machine%23new-answer', 'question_page');

                              );

                              Post as a guest















                              Required, but never shown





















































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown

































                              Required, but never shown














                              Required, but never shown












                              Required, but never shown







                              Required, but never shown







                              Popular posts from this blog

                              Top Tejano songwriter Luis Silva dead of heart attack at 64

                              ReactJS Fetched API data displays live - need Data displayed static

                              政党