title: Can't push my code to Heroku: Permission denied <public key> fatal: Could not read from remote repository
body: <p>I'm trying to push my code to Heroku with this line:</p>
  
  <pre><code>git push heroku master
  </code></pre>
  
  <p>But I keep getting the following error/message:</p>
  
  <pre><code>Warning: Permanently added 'heroku.com,50.85.49.333' &lt;RSA&gt; to the list of known hosts. 
  Permission denied &lt;public key&gt;
  fatal: Could not read from remote repository
  
  Please make sure you have the correct access rights and the repository exists.
  </code></pre>
  
  <p>I have uploaded my key:</p>
  
  <pre><code>heroku keys:add ~/.ssh/id_rsa.pub
  </code></pre>
  
  <p>And set my remote to the git url:</p>
  
  <pre><code>git remote set-url heroku git@heroku.com:project-name.git
  </code></pre>
  
  <p>And still no luck. Could anyone point out the problem?</p>
  
  <p>I am following <a href="https://blog.heroku.com/archives/2011/8/25/java" rel="noreferrer">THIS</a> short tut.</p>