Description
Description of the bug:
Search directory from environment variable USERPROFILE is missing in the .netrc discovery implementation in GoogleAuthUtils.java
Issue https://github.com/bazelbuild/bazel/issues/10867 already requested adding the windows default USERPROFILE location - but it is only realized in UrlRewriter.java
E.g. http_archive successfully uses the .netrc in USERPROFILE but bazel option --remote_cache does not as it uses the faulty/incomplete implementation.
Which category does this issue belong to?
Remote Execution
What's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
Windows host with Bazel Version 8.2.1 and a .netrc file with valid credentials for the remote cache in the windows user home directory. Environment Variables NETRC and HOME are not set or at least do not contain a .netrc file.
Execute a Bazel build using a remote cache
bazel build --remote_cache=SERVER TARGET -s.
You should get a HTTP error code 401 "Unauthorized" and on inspection of the HTTP GET request you should see that the authentication header is missing.
Which operating system are you running Bazel on?
Windows 10 Enterprise
What is the output of bazel info release?
release 8.2.1
If bazel info release returns development version or (@non-git), tell us how you built Bazel.
No response
What's the output of git remote get-url origin; git rev-parse HEAD ?
If this is a regression, please try to identify the Bazel commit where the bug was introduced with bazelisk --bisect.
No response
Have you found anything relevant by searching the web?
Feature request for USERPROFILE usage for windows: https://github.com/bazelbuild/bazel/issues/10867
Any other information, logs, or outputs that you want to share?
No response