Sublime text Package Control下载报错

mac系统

报错详情

Unable to download Insert Nums. Please view the console for more details

通过command+`打开控制台显示详细信息
发现报错

Package Control: Error downloading package. HTTP exception InvalidCertificateException (Host codeload.github.com returned an invalid certificate ([SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:548))) downloading https://codeload.github.com/jbrooksuk/InsertNums/zip/2.0.1.
error: Package Control

报错原因

由于github采用https协议,sublime使用urllib就会报错

解决方法

Preferences -> Package Settings -> Package Controller -> Settings - User
在里面加入

"downloader_precedence":
	{
		"linux":
		[
			"curl",
			"urllib",
			"wget"
		],
		"osx":
		[
			"curl",
			"wget"
		],
		"windows":
		[
			"wininet"
		]
	},

即可解决

你可能感兴趣的:(sublime,text)