bower install behind a proxy fails in timeout with the following settings (some set are useless...) :
git config --global http.proxy fr-proxy.ex
My script (using git bash on Windows) for setting proxy was executed by a different user from the one I was using for bower. The environment variables were not taken into account.
So the following setting is sufficient, as specified in other answers:
export http_proxy=http://fr-proxy.example.com:3128
export https_proxy=http://fr-proxy.example.com:3128