来自 Google 文档的 wget 上的 SSL 证书错误

标签 ssl batch-file wget

我正在写批处理脚本.. 将使用 wget 从 google 文档下载。

我从谷歌公司收到 SSL 错误。

这里是代码 wget(来自这个链接Windows batch file file download from a URL)

@echo off

for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set y=%%k
for /F "tokens=2,3,4 delims=/ " %%i in ('date/t') do set d=%%k%%i%%j
for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set t=%%i%%j
set t=%t%_
if "%t:~3,1%"=="_" set t=0%t%
set t=%t:~0,4%
set "theFilename=%d%%t%"
echo %theFilename%

@pause
cd "C:\Users\MYNAME\Documents\TemObv\GnuWin32\bin"
wget.exe --output-document C:\Users\MYNAME\Documents\TemObv\file_%theFilename%.tsv https://docs.google.com/spreadsheet/pub?key=0AqSBI1OogE84dGN2bXRSZkZPVVRuNkMtN0p4eXpyVlE&single=true&gid=0&range=A5&output=txt
@pause

这是来自 wget 的 ssl 错误

Resolving docs.google.com... 74.125.227.72, 74.125.227.73, 74.125.227.78, ...
Connecting to docs.google.com|74.125.227.72|:443... connected.
ERROR: cannot verify docs.google.com's certificate, issued by `/C=US/O=Google In
c/CN=Google Internet Authority':
  Unable to locally verify the issuer's authority.
To connect to docs.google.com insecurely, use `--no-check-certificate'.
Unable to establish SSL connection.
'single' is not recognized as an internal or external command,
operable program or batch file.
'gid' is not recognized as an internal or external command,
operable program or batch file.
'range' is not recognized as an internal or external command,
operable program or batch file.
'output' is not recognized as an internal or external command,
operable program or batch file.
Press any key to continue . . .

最佳答案

我不知道 Windows,但 wget 的 unix 版本有一个名为 no-check-certificate 的标志,可以在这种情况下使用。

关于来自 Google 文档的 wget 上的 SSL 证书错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13480145/

相关文章:

apache - OpenSSL 在 csr 文件中生成未知的电子邮件地址?

php - Recurly JS API 版本 2.7.0 - 无法验证 Recurly 的 SSL 证书

batch-file - 使用 CMake 批量评估 ninja clang-tidy 的返回值

php - 如何下载并解析网页的一部分?

perl - 继续获取部分下载的文件

node.js - NodeJs + Nginx .. upstream 在从 m upstream 读取响应头时过早地关闭了连接

nginx docker 容器无法读取 certbot 证书

java - 如果 jar java 应用程序尚未运行,则使用批处理仅启动它

windows - Windows Batch 上的最大变量数

linux - bash - wget -q -O - urlto.sh | bash - wget -q -O - urlto.sh | bash - 命令不起作用