WSL 下 Pkg 使用 add 出错

大家好!

请教大家一个问题。当我在 Julia v0.7.0 中使用 add 时 Julia 给出如下错误:

(v0.7) pkg> add BenchmarkTools
Cloning default registries into /home/xfzhang/.julia/registries
Cloning registry General from "https://github.com/JuliaRegistries/General.git
ERROR: failed to clone from https://github.com/JuliaRegistries/General.git, error: GitError(Code:ERROR, Class:SSL, SSL error: 0xffff8d80 - SSL - The connection indicated an EOF)

我的操作系统是 WSL 下安装的 Ubuntu 16.04.5 LTS。
请问大家知道这个问题如何解决吗?

英文社区有人遇到了同样的问题

看上去最后是 手工更新 repo 解决的

For what it is worth, I am now working around this problem by cloning “https://github.com/JuliaRegistries/General.git ” into the registries folder from the Linux command-line (e.g. Bash):

git clone https://github.com/JuliaRegistries/General.git

Then, from Julia I can use the various Pkg commands, but where the following, hopefully harmless, warning is printed:

Updating git-repo `https://github.com/JuliaRegistries/General.git`
? Warning: Some registries failed to update:
?     ? myhome/.julia/registries/General ? failed to fetch from repo
?     ? myhome/.julia/registries/General ? failed to fetch from repo
? @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:144

Then, I need to, periodically, do a git pull on the General repository to make sure I have the latest versions of packages.

ref:

@woclass 谢谢!我之前也看到这个解决方案了,但我还是想来看看有没有更好的解决办法:joy:

将linux中的git更新一下,我这边把版本由1.8.3.1更新到2.23.0解决了这个问题

可以参照置顶贴更换pkg源为国内镜像,github确实是比较慢