Error when downloading package -- Failed to clone from gitlab.com

Hi all,
I’m trying to install MLJ.jl and am running into an error when installing the package:

ERROR: failed to clone from https://gitlab.com/ExpandingMan/ShowCases.jl.git, error: GitError(Code:ERROR, Class:OS, failed to send request: The operation timed out
)

When searching I found this thread: Strange Error at Installing Packages `git` failed to clone - #22 by jmcastro2109 that looked like a similar error.
I tried the suggested solution of:

@eval Module() begin
    import NetworkOptions
    ENV["JULIA_NO_VERIFY_HOSTS"] = "**.gitlab.com"
end

(Note that when trying the solution, I had to create a \config\startup.jl folder & file in my .julia folder… The above code is all I have in startup.jl)
But I still receive the same error.

I was wondering if someone could help me find a different solution? It seems like all other packages (hosted on github) will eventually download fine. Is there a way to install packages offline? Is there a way to use MLJ.jl without ShowCases.jl ? (it seems every other dependency downloaded / installed just fine)

Thanks for your help

Hi,

Does git clone https://gitlab.com/ExpandingMan/ShowCases.jl.git directly in the terminal work?

Sorry, I’m rather dense. How do I do this? Pasting this into the REPL doesn’t work:

Try this :

]  add https://gitlab.com/ExpandingMan/ShowCases.jl.git

in the Julia REPL, it installs ShowCases.jl directly from gitlab.

Well, I wanted to check if it is a Julia issue or a git(lab) issue. So, assuming the add also fails, you can try the git clone inside of your OS’s terminal (e.g. cmd on Windows). Alternatively, from within Julia you could use

run(`git clone https://gitlab.com/ExpandingMan/ShowCases.jl.git`)

Unfortunately this fails with the same error as when it meets this step installing the MLJ package.
Error:

ERROR: failed to clone from https://gitlab.com/ExpandingMan/ShowCases.jl.git, error: GitError(Code:ERROR, Class:OS, failed to send request: The operation timed out)

Couldn’t really figure out how to do it in cmd. Says git is not a supported command.

Trying within Julia got this error:

ERROR: IOError: could not spawn `git clone https://gitlab.com/ExpandingMan/ShowCases.jl.git`: no such file or directory (ENOENT)

Ultimately I suspect there is something in my enterprise’s firewall preventing from grabbing packages from gitlab. Everything from github seems to work just fine.

This likely means that git is not on your path.

In that case, I guess your best option is to check with your sysadmin. Or maybe you can manually (from a browser) download code from gitlab?

I’d recommend asking your company’s sysadmins if they can add the Julia Pkg servers to the firewall’s allowlist. If Julia/Pkg is able to reach the Pkg servers, then source code and artifacts will be downloaded from the Pkg servers, with no need to reach GitHub or GitLab.

The list of Julia Pkg server domains is listed here, in the section titled “Official Domains”:

1 Like

I can certainly download the source directly from gitlab, I wonder if there’s a way to tell Pkg to look at a folder for installation rather than cloning from gitlab?

You can use ] dev <path_to_locally_downloaded_ShowCases>, before using ] add MLJ. If the local ShowCases.jl includes a .git folder, which is the case for e.g. git clone, but not if you download the code as a zip file, you can (and probably should) use ] add <path_to_local_ShowCases> instead.

(I was originally worried that you might need to locally clone MLJ.jl and adjust its Project.toml (and/or Manifest.toml), but that does not appear to be necessary. In fact, ShowCases does not even appear in the Project.tomlfile! :slight_smile:)