0

I am starting out with heroku and am following the getting to start with heroku tutorial. I am on windows 7 and am using Windows powershell as the command line.

The commands that I am using are

git clone git://github.com/heroku/ruby-sample.git
cd ruby-sample
heroku login
heroku create
git push heroku master
heroku open

The directory was cloned and after heroku login I got Authentication successful. in the command line. After heroku create I got

Creating immense-lowlands-8694... done, stack is cedar
http://immense-lowlands-8694.herokuapp.com/ | git@heroku.com:immense-lowlands-8694.git
Git remote heroku added

so the app was added to my heroku account. But there was problem with git push heroku master. I got

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

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

What I have tried so far

  • This question said about adding keys but it is for Linux and didn't work for Windows 7.
  • I used heroku keys and it says that there is a key present for my e-mail ID.
  • As this answer says I tried heroku keys:add and got

this

Found existing public key: C:/Users/Aseem/.ssh/github_rsa.pub
Uploading SSH public key C:/Users/Aseem/.ssh/github_rsa.pub... done

but after that the error didn't end.

  • I tried what this answer says but ssh-keygen wasn't recognized so I guess it's for linux.
  • I tried removing using heroku keys:remove KEY_NAME and then heroku login to login again but that didn't take care of the error either.

What can I do to solve the problem?

Community
  • 1
  • 1
Aseem Bansal
  • 6,722
  • 13
  • 46
  • 84
  • Create a new key using `ssh-keygen` this answer would help you http://stackoverflow.com/questions/15000662/git-heroku-permission-denied-public-key-after-adding-public-key – uday Sep 04 '13 at 06:50
  • @uDaY Do I need to install `ssh-keygen` separately? I had trued that but it wasn't recognized in windows powershell. – Aseem Bansal Sep 04 '13 at 07:20
  • 1
    you can use the existing github keys but I wouldnt recommend. Try to create a new set of keys for heroku. ssh-keygen comes with MSysGit package in Windows. – uday Sep 04 '13 at 07:24

1 Answers1

1

Installed MSysGit instead of git. Added the C:\Program Files(x86)\Git\bin directory to the PATH variable and then doing what this answer says solved the problem.

Community
  • 1
  • 1
Aseem Bansal
  • 6,722
  • 13
  • 46
  • 84