Allow installations from git+file:// if the package is private

See #3868