Use .netrc settings when making a connection

This may be useful to access a private repository protected using HTTP
basic authentication.

Requested by Brad Hilton.