Imikay's Blog
Just another WordPress.com weblog
Fit iframe to 100% of the window
Git: Add multiple ssh keys on Windows Vista
How:
Open a cmd window, set the HOME path environment variable first,
set HOME = C:\Users\(your username)
e.g. C:\Users\imikay
Then:
http://docs.phpfog.com/index.php/features/article/generating_a_ssh_key
http://docs.phpfog.com/index.php/features/article/handling_multiple_ssh_keys
On Windows, you may want to see this:
Github: Permission denied (publickey)
The problem:
Trying to push to GitHub remote repository, got the following error:
Permission denied (publickey)
The solution:
Using ssh-keygen -t rsa to generate keys in any location, then copy them to
the .ssh folder under the Git installation folder, this eliminates the need of
adding the key path to ssh.
Or
start a CMD window, type the following command:
set HOME=C:\Users\(you Windows username)
ssh-keygen -t rsa
Done.
The first line is to set the home directory and the senond one is to generate keys.
Note: This is on Windows Vista.
If you are interested,
the story:
I was trying to deploy my git repository hosted on GitHub to another computer of
mine, following some instructions found on the web, everything went fine until I tried
to push something to the remote repository on GitHub, I got the following error:
Permission denied (publickey).
Hell, what the fuck is this, I did a quick search on the web, found some info here on GitHub
help page[http://help.github.com/ssh-issues/], as they suggested, I should generate some keys
first, I did it like they said, but wait, the ssh-keygen said he couldn’t create file on the default
location “//.ssh/id_rsa”, so where is this location “//.ssh”? I don’t know, I’m using Windows Vista Home
Basic edition. OK, let’s just put the keys in another location, so I put it into C:/Users/imikay/.ssh
folder, and added the path to ssh after one hour’s struggle, I blogged about it here, then I think everything should be fine now.
But, no. The same error like before, then I tried this ssh -vT git@github.com, and got a very verbose debug info,

It seemed that ssh still tried to find the keys in this ‘/.ssh’ folder, so where was this folder,
I figured it out, it is the .ssh folder in the Git installation path, I copied my key files
to this folder, and tried again, hooray, it worked.
“ssh-add: Could not open a connection to your authentication agent” on Windows
Problem:
Using ssh-add to set a custom location of the key file, got the following error:
“Could not open a connection to your authentication agent”
Solution:
In the CMD window, type the following command:
cd path-to-Git/bin (for example,cd C:\Program Files\Git\bin)
bash
exec ssh-agent bash
ssh-add path/to/.ssh/id_rsa
An OO Approach to URL Design
I’m now experimenting with this idea, hope I can write about it soon.
If anyone has some good ideas about this topic, comment bellow please, I’m glad to see
what you think about it.
Forbidden You don’t have permission to access / on this server.
Once upon a time, I visited my localhost for my development site, but the response was:
Forbidden You don’t have permission to access / on this server.
This confused me for a while, because everything was alright before, after quite a number times of tries, I still got no solution.
This really upsetted me, but at the time I was deciding to give it up, I saw the right bottom corner of the Firefox browser, it had a proxy icon there,
yes, that’s right, I was using the proxy. After I switched off the proxy, the problem vanished.
Can’t find libintl-8.dll
Problem:
After installed WAMP Server, and enabled the pgsql and php_pdo_pgsql dynamic extensions,
I restarted the server, got the php startup error saying:can’t find libintl-8.dll.
Solution:
Check to see if Postgresql’s bin path is in the Windows PATH environment, if so,
make sure it comes before that of php’s.