当我在Ubuntu使用wget下载aosp-latest.tar
却遇到了403 Forbidden
Resolving mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)... 101.6.15.130, 2402:f000:1:400::2
Connecting to mirrors.tuna.tsinghua.edu.cn (mirrors.tuna.tsinghua.edu.cn)|101.6.15.130|:443... connected.
HTTP request sent, awaiting response... 403 Forbidden
2023-01-04 16:45:47 ERROR 403: Forbidden.
下面是百度到的结果
403错误代码表示您在该网页上“未被授权”。
由于您还没有提到有关身份验证的任何内容,因此我假设服务器上没有身份验证,请检查是否有一个。
另一个问题可能是由于旧服务器上的某些过滤/防火墙“阻止”了您的请求。
如果您的请求在浏览器中有效并且在wget或curl上失败,请尝试使用用户代理
wget --user-agent="User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12" -c https://mirrors.tuna.tsinghua.edu.cn/aosp-monthly/aosp-latest.tar
现在就可以使用wget下载源码了。