0

I am trying to push a django project to heroku using the command:

git push staging master

and staging refers to this git config:

[remote "staging"]
    url = git@heroku.com:heorku-server.git
    fetch = +refs/heads/*:refs/remotes/staging/*

But I get the following error:

Permission denied (publickey).
fatal: Could not read from remote repository.

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

Fatal error: local() encountered an error (return code 128) while executing 'git push staging master'

Aborting.

I checked the git repo and the heroku server and they both have my exact public key.

Cœur
  • 37,241
  • 25
  • 195
  • 267
user1909186
  • 1,124
  • 2
  • 12
  • 26

1 Answers1

1

Can't make a comment (which is what this response should be), not enough magic internet points.

You may need to generate a new set of SSH keys, but I would try what is in this thread first - Permission denied (publickey) when deploying heroku code. fatal: The remote end hung up unexpectedly

It beats me copy-pasting the steps here right?

Community
  • 1
  • 1
gfritz
  • 559
  • 9
  • 16
  • Thanks for the answer. I figured out these exact steps myself. Adding the key worked for one day and then I ended up creating a new key. – user1909186 Jan 24 '14 at 15:13