添加GitHub包错误

新手新手,在添加GitHub里没有官方认证的包时出( https://github.com/CUG-EMI/EM3DANI.git )现了各种错误,在线添加和离线添加都试过了,求帮助,下面是一些错误提示

julia> Pkg.develop(PackageSpec(url="https://github.com/CUG-EMI/EM3DANI"))
  Updating registry at `C:\Users\silence\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
┌ Warning: Some registries failed to update:
│     — C:\Users\silence\.julia\registries\General — failed to fetch from repo
└ @ Pkg.API C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:162
   Cloning git-repo `https://github.com/CUG-EMI/EM3DANI`
ERROR: failed to clone from https://github.com/CUG-EMI/EM3DANI, error: GitError(Code:ERROR, Class:OS, failed to send request: 操作超时
)
Stacktrace:
 [1] pkgerror(::String) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:120
 [2] #clone#2(::Nothing, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::String) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\GitTools.jl:107
 [3] clone at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\GitTools.jl:88 [inlined]
 [4] (::getfield(Pkg.Types, Symbol("##26#29")){Bool,Pkg.Types.Context,Array{Pkg.Types.PackageSpec,1}})(::LibGit2.CachedCredentials) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:547
 [5] shred!(::getfield(Pkg.Types, Symbol("##26#29")){Bool,Pkg.Types.Context,Array{Pkg.Types.PackageSpec,1}}, ::LibGit2.CachedCredentials) at .\secretbuffer.jl:184
 [6] #handle_repos_develop!#25 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\Types.jl:513 [inlined]
 [7] #handle_repos_develop! at .\none:0 [inlined]
 [8] #add_or_develop#15(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:57
 [9] #add_or_develop at .\none:0 [inlined]
 [10] #add_or_develop#14 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:34 [inlined]
 [11] #add_or_develop at .\none:0 [inlined]
 [12] #add_or_develop#10 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:32 [inlined]
 [13] #add_or_develop at .\none:0 [inlined]
 [14] #develop#21 at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:75 [inlined]
 [15] develop(::Pkg.Types.PackageSpec) at C:\cygwin\home\Administrator\buildbot\worker\package_win64\build\usr\share\julia\stdlib\v1.0\Pkg\src\API.jl:75
 [16] top-level scope at none:0

离线的也不行
(EM3DANI) pkg> add F:\Julia\EM3DANI-master Cloning git-repo F:\Julia\EM3DANI-master`
ERROR: Git repository not found at ‘F:\Julia\EM3DANI-master’

(EM3DANI) pkg> add …/EM3DANI-master
Cloning git-repo ../EM3DANI-master
ERROR: failed to clone from …/EM3DANI-master, error: GitError(Code:ERROR, Class:Net, unsupported URL protocol)`

Julia版本

julia> using InteractiveUtils; versioninfo()
Julia Version 1.0.5
Commit 3af96bcefc (2019-09-09 19:06 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: AMD Ryzen 7 5800H with Radeon Graphics
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-6.0.0 (ORCJIT, generic)

这个项目的 Project.toml 因该是写的不完整。

(v1.0) pkg> add https://github.com/CUG-EMI/EM3DANI
  Updating registry at `C:\Users\woclass\.julia\registries\General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
  Updating git-repo `https://github.com/CUG-EMI/EM3DANI`
ERROR: expected a `name` entry in project file at C:\Users\woclass\AppData\Local\Temp\jl_162A.tmp\Project.toml

不过看你的报错,看起来是你的网络不行

好的,非常感谢!!这是一个老师写的,我是1.05的版本,现在好像也没有mirror镜像加速了,不知道咋弄 :sweat_smile:

我给这个项目更新了一下,大致上可以安装编译了。
可以先试试这个分支:

还有一些小问题:

  • 看起来项目仅支持 linux / maxOS,我是在 win 上手动编译的,所以很多测试过不了
  • 我改了 Project.toml 后,案例文件夹下的例子所需的依赖可能要手动安装。

win + cygwin 编译 后的效果大概是这样。

Test Summary:              | Pass  Error  Total
EM3DANI                    |  135      4    139
  EMUtils                  |   72            72
  TensorMesh               |   48            48
  LinearSolver             |    2      2      4
    iterative solver       |    2             2
    direct solver          |           2      2
      mumps                |           1      1
      mklpardiso           |           1      1
  EM1DUtils                |   13      2     15
    mt1DFwd                |   13            13
    dipole1D               |           2      2
      point dipole         |           1      1
      finite-length dipole |           1      1
ERROR: LoadError: Some tests did not pass: 135 passed, 0 failed, 4 errored, 0 broken.
1 个赞

好的好的,谢谢大佬!我再试试看行不行