fix retry of fetch for protected gem servers

for me the feature with automatic retry for unauthorized response doesn't work. Reasons are missing credentials in the generated uri object and a rescue for Net::HTTPUnauthorized or Net::HTTPForbidden which both are subclasses of Net::HTTPResponse and not exceptions.