I am using windows7. I have created heroku APP using
heroku create loka-xxxx
It will create an app for me with git link.
git@h
Here is the steps i followed to make heroku work with git on my windows machine. Step 1: create ssh rsa keys to use. 1.1 On windows to create ssh keys you need some additional tools from here.
Step 2: Generate ssh key using putty key-gen. name this key as id_rsa. Now you have to pair of id_rsa key(pub&ppk).
Step 3: Put these keys into your
c:\users\<user-name>\.ssh
folder.
Step 4. Now go to the folder where your git is installed. like
C:\Program Files (x86)\Git
and try to create .ssh folder. Note: to create .ssh folder you need to run cmd as administrator and run mkdir .ssh.
Step 5. Now put your id_rsa key pair in this folder "C:\Program Files (x86)\Git\.ssh"
Step 6. open your cmd again. Goto your app folder and do initialize git again. here is the sequence of commands.
git init
git add .
git commit -m "This will be resolved now"
heroku keys:clear
heroku keys:add
git remote add heroku git@heroku.com:<your app>.git
Now you can do
git push heroku master
. Hope i have covered all the steps for the windows user. for mac and unix user follow.
Winfield
If you only have your git keys, you can add your current SSH public key to Heroku to allow pushing with whatever key is already configured on your local git install:
> heroku keys:add
... and then select id_rsa.pub
or whichever key you are using already.
This will allow you to push to github using your existing key.
If you have the private key for the public key already on your Heroku account (listed via heroku keys
), you can over-write the default private key in $HOME/.ssh/id_rsa
with your Heroku private key.