You have to check the following:
- You are using ssh keys of the user who ran hudson daemon. For example, if user=hudson, then you should log on as hudson and generate ssh keys
- You have loaded your public key to your server (github, assembla) from correct .ssh/id_rsa.pub
.ssh/id_rsa.pubfile i.e. for the same user who ran hudson daemon - You have added RSA fingerprint of your server to your .ssh/known_hosts
.ssh/known_hostsfile