ATOM build on Linux behind Proxy


I am new to atom and have tried to build it on a 64 bit Linux Mint machine.
I have referred to many posts pertaining to the same including:

but none of them seem to tackle the problem.

I get the following errors in these scenarios:

  1. sudo script/build:
    " Node: v0.10.25
    npm: v2.5.1
    Installing build modules…
    npm ERR! fetch failed http://
    followed by the warning about the proxy not being set for npm though i HAVE set it!

  2. script/build without sudo

“Installing build modules…
Installing apm…
npm ERR! fetch failed [ATOM-NAN ] ( I had to remove the link due to the limit imposed on a new users )

I have followed instructions from various parts on the internet.
including setting ssl to true and setting the registry URL

Is there a concrete solution to this or has this been left un-resolved?