Go to Nodejs.org and download and install your favoured version.
First, get node.js and npm, and also get a symlink from nodejs to node on the command line
$ sudo aptitude install nodejs-legacy
Then, you need to give npm the right permission:
npm config get prefix
If you get back /usr/local, then do:
sudo chown -R $(whoami) $(npm config get prefix)/{lib/node_modules,bin,share}
$ node -v
... and ...
$ npm -v
Version seems to be fine? Ready to go!
You need to generate a SSH key and add it to your GitHub account.