On some newer curl versions you need to use socks5h:// instead of socks5://
I don't know wheter this may be an issue for you or not, but if you run into the message gpgkeys: HTTP fetch error 7: Can't complete SOCKS5 connection to 0.0.0.0:0. (1) you may probably have this case. My curl version 7.32 on Fedora doesn't work with socks5://TORIP:TORPORT but only with socks5h://TORIP:TORPORT.
On some newer curl versions you need to use socks5h:// instead of socks5:// I don't know wheter this may be an issue for you or not, but if you run into the message
gpgkeys: HTTP fetch error 7: Can't complete SOCKS5 connection to 0.0.0.0:0. (1)
you may probably have this case. My curl version 7.32 on Fedora doesn't work withsocks5://TORIP:TORPORT
but only withsocks5h://TORIP:TORPORT
.