depot_tools更新失败

depot_tools更新失败

鉴于伟大的墙,windows系统下使用depot_tools命令(比如gclient)时会出现更新失败的错误:

Ensuring CIPD client is up-to-date
GET https://chrome-infra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?version=bccdb9a605037e3dd2a8a64e79e08f691a6f159d&package_name=infra%2Ftools%2Fcipd%2Fwindows-amd64
Failed to fetch https://chrome-infra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?version=bccdb9a605037e3dd2a8a64e79e08f691a6f159d&package_name=infra%2Ftools%2Fcipd%2Fwindows-amd64
Retrying in 1 sec.
GET https://chrome-infra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?version=bccdb9a605037e3dd2a8a64e79e08f691a6f159d&package_name=infra%2Ftools%2Fcipd%2Fwindows-amd64
Failed to fetch https://chrome-infra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?version=bccdb9a605037e3dd2a8a64e79e08f691a6f159d&package_name=infra%2Ftools%2Fcipd%2Fwindows-amd64
Retrying in 2 sec.
GET https://chrome-infra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?version=bccdb9a605037e3dd2a8a64e79e08f691a6f159d&package_name=infra%2Ftools%2Fcipd%2Fwindows-amd64
Failed to fetch https://chrome-infra-packages.appspot.com/_ah/api/repo/v1/instance/resolve?version=bccdb9a605037e3dd2a8a64e79e08f691a6f159d&package_name=infra%2Ftools%2Fcipd%2Fwindows-amd64
Retrying in 3 sec.

笔者尝试使用Lantern、Shadowsocks(尚未支持全局代理时)更新都不行。无奈之下,买了个国外的windows云服务器,在服务器上下载更新好再复制回来。
此时再次执行gclient,命令行窗口卡了一段时间以后出现如下错误:

fatal: unable to access >’https://chromium.googlesource.com/chromium/tools/depot_tools.git/‘: Failed to connect to chromium.googlesource.com port 443: Timed out

还是归功于伟大的墙,解决方法是禁用自动更新(如果你使用了类似文末的方法支持了shadowsocks全局代理,那么这一步不是必须的),在update_depot_tools.bat里加入:

:: MODIFY: Disable automatic update!
set DEPOT_TOOLS_UPDATE=0

温馨提示:直接在环境变量里设置DEPOT_TOOLS_UPDATE0也可以。Windows平台可能还需要设置DEPOT_TOOLS_WIN_TOOLCHAIN0

至此,depot_tools就可以用了,执行gclient,得到如下输出:

Usage: gclient.py <command> [options]

Meta checkout dependency manager for Git.

Commands are:
cleanup dEPRECATED: SVN-only. Cleaned up all working copies
config creates a .gclient file in the current directory
diff displays local diff for every dependencies
fetch fetches upstream commits for all modules
grep greps through git repos managed by gclient
help prints list of commands or help for a specific command
hookinfo outputs the hooks that would be run by gclient runhooks
pack generates a patch which can be applied at the root of the tree
recurse operates [command args …] on all the dependencies
revert reverts all modifications in every dependencies
revinfo outputs revision info mapping for the client and its dependencies
root outputs the solution root (or current dir if there isn’t one)
runhooks runs hooks for files that have been modified in the local working copy
status shows modification status for every dependencies
sync checkout/update all modules
verify verifies the DEPS file deps are only from allowed_hosts

Options:
–version show program’s version number and exit
-h, –help show this help message and exit
-j JOBS, –jobs=JOBS Specify how many SCM commands can run in parallel;
defaults to 8 on this machine
-v, –verbose Produces additional output for diagnostics. Can be
used up to three times for more logging info.
–gclientfile=CONFIG_FILENAME
Specify an alternate .gclient file
–spec=SPEC create a gclient file containing the provided string.
Due to Cygwin/Python brokenness, it can’t contain any
newlines.
–no-nag-max Ignored for backwards compatibility.

附上windows版下载链接:我是人见人爱花见花开的传送门,门票3分,别看了,戳我就对了!,此版本已禁用depot_tools的更新,如需启用,使用原始文件update_depot_tools.bat.original替换update_depot_tools.bat即可。
需要macos版的话由此传送,门票1分,这是我从git仓库下载的版本。

温馨提示:如果你需要准备翻墙梯子的话,可以看这里shadowsocks和proxifier的安装配置

请大佬指点一下,我 depot_tools 已经下载了,搜了一下 这个错误可能是因为终端没有设置代理导致的,在。etc/profile 和.bashrc文件中设置export http_proxy或者https的代理,还是不行。 ``` ________ running 'cipd ensure -log-level error -root /home/code/webrtc -ensure-file /tmp/tmpgoN0Y6.ensure' in '.' CIPD selfupdate failed. Trying to bootstrap the CIPD client from scratch... [P17588 10:32:40.106 client.go:309 W] RPC failed transiently. Will retry in 1s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"1s"} [P17588 10:32:41.110 client.go:309 W] RPC failed transiently. Will retry in 2s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"2s"} [P17588 10:32:43.126 client.go:309 W] RPC failed transiently. Will retry in 4s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"4s"} [P17588 10:32:47.133 client.go:309 W] RPC failed transiently. Will retry in 8s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"8s"} [P17588 10:32:55.134 client.go:309 W] RPC failed transiently. Will retry in 16s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"16s"} [P17588 10:33:11.136 client.go:309 W] RPC failed transiently. Will retry in 32s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"32s"} [P17588 10:33:43.137 client.go:309 W] RPC failed transiently. Will retry in 1m4s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"1m4s"} [P17588 10:34:47.144 client.go:309 W] RPC failed transiently. Will retry in 2m8s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"2m8s"} [P17588 10:36:55.146 client.go:309 W] RPC failed transiently. Will retry in 4m16s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"4m16s"} [P17588 10:41:11.149 client.go:309 W] RPC failed transiently. Will retry in 8m32s {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository", "sleepTime":"8m32s"} [P17588 10:49:43.151 client.go:329 W] RPC failed permanently: failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF {"error":"failed to send request: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF", "host":"chrome-infra-packages.appspot.com", "method":"ResolveVersion", "service":"cipd.Repository"} Error: Post https://chrome-infra-packages.appspot.com/prpc/cipd.Repository/ResolveVersion: proxyconnect tcp: EOF. Bootstrap from scratch failed, something is seriously broken. Run the following commands to diagnose if this is repeating: export CIPD_HTTP_USER_AGENT_PREFIX=depot_tools/f88941ad41370c76e289fdbdef562e6ceac9291b/manual /home/depot_tools/.cipd_client selfupdate -version-file /home/depot_tools/cipd_client_version Error: Command 'cipd ensure -log-level error -root /home/code/webrtc -ensure-file /tmp/tmpgoN0Y6.ensure' returned non-zero exit status 1 ```
©️2020 CSDN 皮肤主题: 编程工作室 设计师:CSDN官方博客 返回首页