Repository navigation
Description
ATTENTION! Please read and follow:
- if this is a question about how to build / test / query / deploy using Bazel, or a discussion starter, send it to [email protected]
- if this is a bug or feature request, fill the form below as best as you can.
Description of the problem / feature request:
Any attempt to run bazel build even as simple as "bazel build" will cause An error occurred during the fetch of repository 'rules_python'
Turning on client_debug does not show anything that is useful to see what are the actual http requests being sent. If it shows what's going on, it will at least offer some clue.
bazel --client_debug build
Feature requests: what underlying problem are you trying to solve with this feature?
Replace this line with your answer.
Bugs: what's the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
I already have .netrc file setup as in ~/.netrc and tested with those credentials to make sure they work.
Any attempt to run bazel build even as simple as "bazel build" will cause An error occurred during the fetch of repository 'rules_python'
WARNING: Download from https://github.com/bazelbuild/rules_python/archive/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 401 Unauthorized
ERROR: An error occurred during the fetch of repository 'rules_python':
java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_python/archive/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz] to /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/rules_python/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz: GET returned 401 Unauthorized
INFO: Call stack for the definition of repository 'bazel_gazelle' which is a http_archive (rule definition at /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/bazel_tools/tools/build_defs/repo/http.bzl:292:16):
- /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/io_bazel_rules_docker/repositories/repositories.bzl:140:9
What operating system are you running Bazel on?
macos Mojave Version 10.14.6
What's the output of bazel info release?
2.0
If bazel info release returns "development version" or "(@Non-Git)", tell us how you built Bazel.
Replace this line with your answer.
What's the output of git remote get-url origin ; git rev-parse master ; git rev-parse HEAD ?
Replace this line with your answer.
Have you found anything relevant by searching the web?
no
Any other information, logs, or outputs that you want to share?
Invoke `bazel help build` for full description of usage and options.
Your request is correct, but requested an empty set of targets. Nothing will be built.
INFO: Call stack for the definition of repository 'rules_python' which is a http_archive (rule definition at /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/bazel_tools/tools/build_defs/repo/http.bzl:292:16):
- /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/io_bazel_rules_docker/repositories/repositories.bzl:89:9
- /Users/etsang/dev/src/cd.splunkdev.com/streamlio/streamlio/WORKSPACE:187:1
WARNING: Download from https://github.com/bazelbuild/rules_python/archive/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz failed: class com.google.devtools.build.lib.bazel.repository.downloader.UnrecoverableHttpException GET returned 401 Unauthorized
ERROR: An error occurred during the fetch of repository 'rules_python':
java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_python/archive/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz] to /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/rules_python/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz: GET returned 401 Unauthorized
INFO: Call stack for the definition of repository 'bazel_gazelle' which is a http_archive (rule definition at /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/bazel_tools/tools/build_defs/repo/http.bzl:292:16):
- /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/io_bazel_rules_docker/repositories/repositories.bzl:140:9
- /Users/etsang/dev/src/cd.splunkdev.com/streamlio/streamlio/WORKSPACE:187:1
ERROR: no such package '@rules_python//python': java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_python/archive/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz] to /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/rules_python/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz: GET returned 401 Unauthorized
ERROR: no such package '@rules_python//python': java.io.IOException: Error downloading [https://github.com/bazelbuild/rules_python/archive/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz] to /private/var/tmp/_bazel_etsang/1c934e33649dc402e585a9ee332986e2/external/rules_python/38f86fb55b698c51e8510c807489c9f4e047480e.tar.gz: GET returned 401 Unauthorized```
Activity
etsangsplk commentedon Mar 22, 2020
It is personal token. github deprecated auth via login and password via rest api. That is why
electrofelix commentedon Mar 24, 2020
I'm running into this as well, and as I run in the build in a docker image I could have a look at what was going on.
I tried exporting a token into the docker build env, upgrading the base docker env, switching versions of bazel, nothing seemed to work.
So when I did a curl from within the docker build of one of the files I saw the following output:
So I suspect there was something broken on Github's end for hosting packages, and they removed the broken varnish cache because it started working again with a fresh docker build locally for me.
etsangsplk commentedon Mar 24, 2020
And how did you remove the varnish cache? This is the first time I use bazel.
electrofelix commentedon Mar 26, 2020
@etsangsplk I didn't, seems Github removed it, did your errors go away at all?
etsangsplk commentedon Mar 26, 2020
yup. since github deprecatrf login/password for rest access.. I just need to change .netrc to use personal token to make the error go away.