由于SSL连接错误,Cargo无法下载文件

时间:2017-01-30 13:55:08

标签: windows ssl curl rust rust-cargo

当Cargo尝试下载文件时,会出现错误[35] SSL connect error。我正在使用Windows而我没有使用代理。

如果我尝试使用cargo build编译项目,则会返回错误:

 Downloading crypto-hash v0.2.1
error: unable to get packages from source

Caused by:
  [35] SSL connect error (schannel: next InitializeSecurityContext failed: Unknown error (0x80092013) - Il server di revoca � offline. La funzione richiamata non � in grado di completare il controllo di revoca.)

卷曲有问题吗? 我找到了this article,但我不知道是否必须在.cargo\config文件中添加一些配置。

4 个答案:

答案 0 :(得分:2)

您的错误消息(自动翻译成英文)说:

  

吊销服务器处于离线状态。回调函数将无法完成吊销检查

SSL证书可以随时撤销,因此客户端需要能够检查服务器以查看它们所处的状态。无论出于何种原因,您的计算机都无法连接到服务器。这极不可能成为货物问题;您可能需要执行正常的网络故障排除,以发现无法连接到此服务器的原因。

围绕此问题,有许多货物问题(279711806361689,可能更多。建议包括:

636 has a comment也特别关于吊销服务器。

截至2016-12-01

  

tl; dr;我相信现在在Windows上没有办法让Cargo接受无效的[原文] SSL证书。

答案 1 :(得分:0)

您可以使用~\.cargo\config中的一个选项来阻止Cargo检查已吊销的证书:

[http]
check-config = false

答案 2 :(得分:0)

按照马蒂的回答,这对我有用:

import os
import glob
import csv
import xlsxwriter
from xlsxwriter.workbook import Workbook
import pandas as pd
import numpy as np
#from sqlalchemy import create_engine
#import openpyxl
#from openpyxl import load_workbook

os.chdir ("/EagleScout")
path = '.'
extension = 'csv'


# Remove the combined .csv file from previous runs
#This will provide clean date without corruption from earlier runs
if os.path.exists('./Spreadsheets/combined.csv'): 
    os.remove ('./Spreadsheets/combined.csv')

#Remove previous Excel spreadsheet
if os.path.exists('./Spreadsheets/Tournament.xlsx'): 
    os.remove ('./Spreadsheets/Tournament.xlsx')


#Remove sorted combined csv
#Remove previous Excel spreadsheet
if os.path.exists('./Spreadsheets/Combined.xlsx'): 
    os.remove ('./Spreadsheets/Combined.xlsx')


#Read in and merge all .CSV file names
files_in_dir = [ f for f in glob.glob('*.csv')] 


#Create a single combined .csv file with all data
#from all matches completed so far.
d1 = pd.read_csv('Header.txt')
d1.to_csv('./Spreadsheets/combined.csv', header = True, index = False)

for filenames in files_in_dir: 
    df = pd.read_csv(filenames)
    fName, fExt = (os.path.splitext(filenames))
    sName = fName.split('-')
    N=(sName[1])
    df.insert(0,N,N,True)
    df.to_csv('./Spreadsheets/combined.csv', index_label = (sName[0]), mode = 'a')


#Combine all csv files into one master Raw Excel Data file
#and add column headers as labels
with pd.ExcelWriter('./Spreadsheets/Combined.xlsx') as writer:
    dt = pd.read_csv('./Spreadsheets/combined.csv')
    dt.to_excel(writer, sheet_name = 'All data')

    writer.save()



#Parse through all .CSV files and append content to appropriate team worksheet.
with pd.ExcelWriter('./Spreadsheets/Tournament.xlsx') as writer:

    df2 = pd.read_excel('./Spreadsheets/Combined.xlsx')
    group = df2.groupby('Team')
    for Team, Team_df in group:

        Team_df.to_excel(writer, sheet_name = str(Team))


    writer.save()

答案 3 :(得分:0)

设置环境变量CARGO_HTTP_CHECK_REVOKE=false。这对我有用。 我确实尝试将以下设置放入配置中,但没有用;

[http]
http.check-revoke = false

我在Windows 10 x64上,内部版本1903。