bazel sync请求github登录,但失败

bazel sync请求github登录,但失败,github,bazel,Github,Bazel,我不知道这是因为我今天不得不更改github密码,还是与github切换到使用令牌而不是密码进行访问有关 我一直在使用local\u repository来处理我的各个项目之间的依赖关系,因为在我迁移到bazel的过程中,很多项目都处于不断变化之中,所以每次增量更改都必须不断地推送到github,然后再重新同步是没有意义的 今天我终于准备好开始使用git_存储库作为依赖项 与此不同的是,我发现我无法登录到web上的github,结果重置了密码(我怀疑我不小心在密码管理器中弄糟了什么) 无论如何,

我不知道这是因为我今天不得不更改github密码,还是与github切换到使用令牌而不是密码进行访问有关

我一直在使用
local\u repository
来处理我的各个项目之间的依赖关系,因为在我迁移到bazel的过程中,很多项目都处于不断变化之中,所以每次增量更改都必须不断地推送到github,然后再重新同步是没有意义的

今天我终于准备好开始使用
git_存储库
作为依赖项

与此不同的是,我发现我无法登录到web上的github,结果重置了密码(我怀疑我不小心在密码管理器中弄糟了什么)

无论如何,我能够让第一个项目的更改全部提交并毫无问题地推送到github。当我转到第二个项目时,我将对project#1的依赖关系从
local_repository
更改为
git_repository
,并尝试
bazel sync
,以获取我刚才在那里提交的更改

结果:一个github的登录窗口弹出,我尝试了我刚刚成功用于登录web的登录凭据。盒子消失了又出现了,当我再次尝试同样的信条时,我得到了下面的错误

我过去也用过同样的命令,一切都正常。我不知道密码更改是否是问题所在,旧密码是否被卡住了,或者github是否切换到需要令牌是问题所在。我发现关于将github令牌用于bazelisk abnd尝试将
bazelisk_github_令牌的环境变量设置为新创建的令牌,但这没有帮助。我不知道接下来该怎么办

错误:

C:\projects\java\common>bazel sync
INFO: Repository bdl_deps instantiated at:
  C:/projects/java/common/WORKSPACE:5:15: in <toplevel>
Repository rule git_repository defined at:
  C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
ERROR: An error occurred during the fetch of repository 'bdl_deps':
   Traceback (most recent call last):
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl", line 181, column 30, in _git_repository_implementation
                update = _clone_or_update(ctx)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, column 20, in _clone_or_update
                git_ = git_repo(ctx, directory)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 91, column 12, in git_repo
                _update(ctx, git_repo)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 103, column 10, in _update
                fetch(ctx, git_repo)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 145, column 15, in fetch
                _error(ctx.name, ["git"] + args, st.stderr)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 190, column 9, in _error
                fail("error running '%s' while working with @%s:\n%s" % (command_text, name, stderr))
Error in fail: error running 'git fetch origin master:origin/master' while working with @bdl_deps:
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
ERROR: Error fetching repository: Traceback (most recent call last):
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl", line 181, column 30, in _git_repository_implementation
                update = _clone_or_update(ctx)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, column 20, in _clone_or_update
                git_ = git_repo(ctx, directory)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 91, column 12, in git_repo
                _update(ctx, git_repo)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 103, column 10, in _update
                fetch(ctx, git_repo)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 145, column 15, in fetch
                _error(ctx.name, ["git"] + args, st.stderr)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 190, column 9, in _error
                fail("error running '%s' while working with @%s:\n%s" % (command_text, name, stderr))
Error in fail: error running 'git fetch origin master:origin/master' while working with @bdl_deps:
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
ERROR: no such package '@bdl_deps//': error running 'git fetch origin master:origin/master' while working with @bdl_deps:
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
Loading: loading...

C:\projects\java\common>bazel version
Bazelisk version: v1.3.0
Build label: 4.1.0
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri May 21 11:17:01 2021 (1621595821)
Build timestamp: 1621595821
Build timestamp as int: 1621595821

C:\projects\java\common>clear

C:\projects\java\common>bazel sync
INFO: Repository bdl_deps instantiated at:
  C:/projects/java/common/WORKSPACE:5:15: in <toplevel>
Repository rule git_repository defined at:
  C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl:199:33: in <toplevel>
ERROR: An error occurred during the fetch of repository 'bdl_deps':
   Traceback (most recent call last):
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl", line 181, column 30, in _git_repository_implementation
                update = _clone_or_update(ctx)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, column 20, in _clone_or_update
                git_ = git_repo(ctx, directory)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 91, column 12, in git_repo
                _update(ctx, git_repo)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 103, column 10, in _update
                fetch(ctx, git_repo)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 145, column 15, in fetch
                _error(ctx.name, ["git"] + args, st.stderr)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 190, column 9, in _error
                fail("error running '%s' while working with @%s:\n%s" % (command_text, name, stderr))
Error in fail: error running 'git fetch origin master:origin/master' while working with @bdl_deps:
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
ERROR: Error fetching repository: Traceback (most recent call last):
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl", line 181, column 30, in _git_repository_implementation
                update = _clone_or_update(ctx)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git.bzl", line 36, column 20, in _clone_or_update
                git_ = git_repo(ctx, directory)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 91, column 12, in git_repo
                _update(ctx, git_repo)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 103, column 10, in _update
                fetch(ctx, git_repo)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 145, column 15, in fetch
                _error(ctx.name, ["git"] + args, st.stderr)
        File "C:/_bazel_out/seszwrcl/external/bazel_tools/tools/build_defs/repo/git_worker.bzl", line 190, column 9, in _error
                fail("error running '%s' while working with @%s:\n%s" % (command_text, name, stderr))
Error in fail: error running 'git fetch origin master:origin/master' while working with @bdl_deps:
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
ERROR: no such package '@bdl_deps//': error running 'git fetch origin master:origin/master' while working with @bdl_deps:
fatal: HttpRequestException encountered.
   An error occurred while sending the request.
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Username for 'https://github.com': No error
Loading: loading...

操作系统:Windows 10。

环顾四周,只需调用它找到的带有相应参数的
git
->任何用于该
git
的身份验证配置/帮助程序,就可以从repo中
获取
(bazel或not)。也许检查这仍然是情况/工作(在密码更新后),并在必要时进行调整?一般来说,只需将bazel从等式中去掉一点,调试可能会更容易。在尝试了更多的事情之后,我最终为命令行重新生成了我的令牌,并再次尝试。还是不走运。然后我试着运行
git clone
,但仍然弹出了一个弹出窗口,它也不起作用,但没有失败,而是从命令行提示我输入用户名和密码。使用令牌作为密码似乎有效。我删除并再次尝试只是为了确认,这一次我得到了一个HttpRequestException开始,然后它继续工作。而且很突然,
bazel-sync
也能工作。
C:\projects\java\common>bazel version
Bazelisk version: v1.3.0
Build label: 4.1.0
Build target: bazel-out/x64_windows-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Fri May 21 11:17:01 2021 (1621595821)
Build timestamp: 1621595821
Build timestamp as int: 1621595821