I installed nodester on my own EC2 instance, and everything seems to be working. I get a Nodester 404 page when the app doesn't exist, and a 503 if I create it but haven't pushed anything yet. As far as I can tell, everything is set up correctly.
However, I get an error when I do a "git push":
$ git push nodester@[my domain]:/git/test4/4-d71b3d5d1a18a5446542ad4ae66b3db3.git
Permission denied (publickey).
fatal: Could not read from remote repository.
The git repo exists in /git. I've tried with various rsa keys (and I've used them elsewhere; they work), but no luck.
I'm sure this is my fault, but any pointers on how to debug this? Things I can check? Ways to see more information or logs? I'm completely lost.
Where/how are rsa keys stored inside nodester? That might be a good place to start.
A bit closer. (For the record, I used the nodester-installer on an Ubuntu EC2 instance.)
First, I was getting this error:
stderr: sudo: no tty present and no askpass program specified
I managed to fix it by adding this to my sudo file. This seems wrong (since I haven't seen it mentioned anywhere), however it made it so update_authkeys would work.
nodester ALL = NOPASSWD: /node/nodester/nodester/scripts/update_authkeys.js *
Next, I had to manually add the .ssh directory to /git. The instructions say to add it to ~/.ssh, however the node script is looking for /git/.ssh.
Once I did all this, I got no errors and the keys were saved to authorized_keys. Still getting the same "Permission denied (publickey)." error, though.
For anyone wondering, I fixed the TTY problem by changing the files in /upstart/ to use the method mentioned on StackOverflow. (Don't forget to copy the upstart files over to /etc/init/ after you fix them.)
I also had to change it so that the keys were written to /node/nodester/.ssh/ as opposed to /git/.ssh/.
I'm slightly worried about the security implications, however the /usr/local/bin/git-shell-enforce-directory /git/[directory] seems to do the trick?