Those 'ravers' must work on *nix machines though, as there are a few hoops to jump through to get Heroku successfully talking to Windows XP.
For starters, I will assume you have the following already installed and running on your Windows box:
- Heroku itself
- Git and Putty
Step 1: Store your SSH key
You can generate a new one, or you can use the same one you have generated for Git, but Heroku requires some fairly specific things for this to work. The following assumes you are using PuttyGen to generate your SSH key:
- Your public key must be stored in a '.ssh' directory in your Windows 'home' directory (ie. something like 'C:/Documents and Settings/Username/.ssh/id_rsa.pub'
- Note: you can't create the '.ssh' directory using Windows Explorer (explorer won't let you create any directory that begins with a '.'). You must use Git Bash for that.
- You must cut and paste the 'Public key for pasting into OpenSSH authorized_keys file' into your id_rsa.pub file (replacing the content of the file that you created using 'Save public key'). Otherwise, you will get persistent messages when you try to interact with Heroku, to the effect that you have 'Contents Invalid public key'
As you may have read for Github in the post referenced above, for each server that you wish to connect your Windows box to, using SSH, you need to have a host key defined in your Windows Registry. This is true for Heroku. If you don't have the appropriate host key, you will see a message something like the following:
"The server's host key is not cached in the registry. You have no guarantee that the server is the computer you think it is."
To establish Heroku's host key in your Windows Registry:
- Open putty
- Type 'heroku.com' in the hostname box and click 'Open'
- When you see the prompt, 'The server's host key is not cached in the registry...', click 'Yes'
- You do not need to log on, and can close putty at this point
When you open pageant, click 'Add Key', and select the private key of the key you have stored in your home '.ssh' directory.
After that, you should find that it does 'just work'!
No comments:
Post a Comment