下载步骤同 electron源码下载及编译_electron源码编译-CSDN博客
问题1 从github 下载 dugite超时,原因没有找到
Validation failed. Expected '8ea2d0d3c9d9e4615069913207371ffe892dc10fb93975972f2f6e668f2e3b3a' but got 'e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855'
A timeout has occurred while downloading 'https://github.com/desktop/dugite-native/releases/download/v2.29.3-2/dugite-native-v2.29.3-3d467be-windows-x64.tar.gz' - check your internet connection and try again. If you are using a proxy, make sure that the HTTP_PROXY and HTTPS_PROXY environment variables are set. GotError [RequestError]: connect ETIMEDOUT 20.205.243.166:443
魔法感觉没问题换了多个节点,用不同的魔法都不行。
我的网络应该可以访问github的,因为使用web网页可以访问github, 使用 curl -L -O https://github.com/desktop/dugite-native/releases/download/v2.29.3-2/dugite-native-v2.29.3-3d467be-windows-x64.tar.gz 也可以下载,js脚本下载就会超时。
尝试修改js脚本,加重定向,修改tls版本,都没有成功。
最后的解决办法:
手动下载,放在对应的目录下
- 网页端可以下载 https://github.com/desktop/dugite-native/releases/download/v2.29.3-2/dugite-native-v2.29.3-3d467be-windows-x64.tar.gz
- 设置环境变量 set DUGITE_CACHE_DIR=D:\electron-22.3.27\.git_cache
- 把手动下载好的文件放在D:\electron-22.3.27\.git_cache目录下
- 然后再次执行 gclient sync --with_branch_heads --with_tags,不下载当然不会再超时
问题 2 找不到 gs://chromium-tools-traffic_annotation
Failed to fetch file gs://chromium-tools-traffic_annotation/6b6864f1c8afbcdae654582e5f3309d7b1d5a6ad for src/tools/traffic_annotation/bin/win32\traffic_annotation_auditor.exe. [Err: CommandException: No URLs matched: gs://chromium-tools-traffic_annotation/6b6864f1c8afbcdae654582e5f3309d7b1d5a6ad
D:\electron-22.3.27\electron_src\src\third_party\depot_tools\external_bin\gsutil\gsutil_4.68\gsutil\gslib\vendored\boto\boto\pyami\config.py:69: UserWarning: Unable to load AWS_CREDENTIAL_FILE ()
warnings.warn('Unable to load AWS_CREDENTIAL_FILE (%s)' % full_path)
]
问题3:过程中尝试下载最新的depot_tools,第一次gclient更新失败
也不是更新失败吧,更新时比较快,没有报错,但是gclient sync --with_branch_heads --with_tags时,多种报错,其实配置了DEPOT_TOOLS_UPDATE为0,gclient根本没有更新,所以gclient sync会有多个错误,多个工具找不到