# Failed to add package by https URL

**URL:** <https://discourse.julialang.org/t/failed-to-add-package-by-https-url/76436>\
**Category:** General Usage\
**Created:** [February 13, 2022, 10:47am UTC](https://discourse.julialang.org/t/failed-to-add-package-by-https-url/76436 "2022-02-13T10:47:19Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![likanzhan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/likanzhan/32/26354_2.png) [@likanzhan](https://discourse.julialang.org/u/likanzhan)\
**Post date:** [February 13, 2022, 10:47am UTC](https://discourse.julialang.org/t/failed-to-add-package-by-https-url/76436/1 "2022-02-13T10:47:19Z")

</div>

I got similar problems, such as

```julia
(@v1.7) pkg> add https://github.com/fonsp/Pluto.jl
     Cloning git-repo `https://github.com/fonsp/Pluto.jl`
ERROR: failed to clone from https://github.com/fonsp/Pluto.jl, error: GitError(Code:ERROR, Class:HTTP, unknown http scheme 'socks5')

```

The information of my system is:

```julia
julia> versioninfo()
Julia Version 1.7.2
Commit bf53498635 (2022-02-06 15:21 UTC)
Platform Info:
  OS: macOS (x86_64-apple-darwin19.5.0)
  CPU: Apple M1 Max
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-12.0.1 (ORCJIT, westmere)
Environment:
  JULIA_NUM_THREADS = 1
  JULIA_EDITOR = code
  JULIA_NO_VERIFY_HOSTS = **.github.com

```

The version of git is:

```julia
shell> git --version
git version 2.32.0 (Apple Git-132)

```

Add I’ve add the following lines to `.Julia/config/startup.jl`

```julia

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

```

Any suggestions?

Thanks.

Likan

---

<div class="post-metadata">

**Author:** ![fredrikekre](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/fredrikekre/32/1688_2.png) [@fredrikekre](https://discourse.julialang.org/u/fredrikekre)\
**Post date:** [February 13, 2022, 11:13am UTC](https://discourse.julialang.org/t/failed-to-add-package-by-https-url/76436/2 "2022-02-13T11:13:39Z")

</div>

That is not the same error. Looks like you are using a `socks5` proxy which I guess `libgit2` doesn’t handle.

In Julia version 1.7 and above you can configure Pkg to use system `git` by setting the environment variable `JULIA_PKG_USE_CLI_GIT=true`. Perhaps you can try that?

---

<div class="post-metadata">

**Author:** ![likanzhan](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/likanzhan/32/26354_2.png) [@likanzhan](https://discourse.julialang.org/u/likanzhan)\
**Post date:** [February 13, 2022, 12:46pm UTC](https://discourse.julialang.org/t/failed-to-add-package-by-https-url/76436/3 "2022-02-13T12:46:54Z")

</div>

It solved my problem. Thanks.
