<p dir="auto">Hi,</p>
<p dir="auto">I've been experiencing some dificulty using Pkg.init() and Pkg.add() behind a corporate proxy. See below...</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[31510:31508 - 0:1029] 01:16:24 [root@gb-slo-svb-0139:o +1] /opt $ julia
Version 0.5.0-dev
x86_64-redhat-linux
julia&gt; Pkg.init()
INFO: Initializing package repository /opt/julia/lib/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:OS, Failed to connect to github.com: Connection refused)
 [inlined code] from libgit2/error.jl:98
 in clone at libgit2/repository.jl:189
 in __clone#364__ at libgit2.jl:310
 in anonymous at pkg/dir.jl:49
 in cd at file.jl:47
 in init at pkg/dir.jl:47
 in init at pkg.jl:22
 in eval at ./boot.jl:263

julia&gt;
[31510:31508 - 0:1030] 01:16:32 [root@gb-slo-svb-0139:o +1] /opt $ cd /tmp/
[31510:31508 - 0:1031] 01:16:38 [root@gb-slo-svb-0139:o +1] /tmp $ git clone https://github.com/JuliaLang/METADATA.jl
Cloning into 'METADATA.jl'...
remote: Counting objects: 52190, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 52190 (delta 3), reused 0 (delta 0), pack-reused 52178
Receiving objects: 100% (52190/52190), 6.68 MiB | 3.47 MiB/s, done.
Resolving deltas: 100% (13081/13081), done.
[31510:31508 - 0:1032] 01:16:52 [root@gb-slo-svb-0139:o +1] /tmp $"><pre class="notranslate"><code class="notranslate">[31510:31508 - 0:1029] 01:16:24 [root@gb-slo-svb-0139:o +1] /opt $ julia
Version 0.5.0-dev
x86_64-redhat-linux
julia&gt; Pkg.init()
INFO: Initializing package repository /opt/julia/lib/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:OS, Failed to connect to github.com: Connection refused)
 [inlined code] from libgit2/error.jl:98
 in clone at libgit2/repository.jl:189
 in __clone#364__ at libgit2.jl:310
 in anonymous at pkg/dir.jl:49
 in cd at file.jl:47
 in init at pkg/dir.jl:47
 in init at pkg.jl:22
 in eval at ./boot.jl:263

julia&gt;
[31510:31508 - 0:1030] 01:16:32 [root@gb-slo-svb-0139:o +1] /opt $ cd /tmp/
[31510:31508 - 0:1031] 01:16:38 [root@gb-slo-svb-0139:o +1] /tmp $ git clone https://github.com/JuliaLang/METADATA.jl
Cloning into 'METADATA.jl'...
remote: Counting objects: 52190, done.
remote: Compressing objects: 100% (12/12), done.
remote: Total 52190 (delta 3), reused 0 (delta 0), pack-reused 52178
Receiving objects: 100% (52190/52190), 6.68 MiB | 3.47 MiB/s, done.
Resolving deltas: 100% (13081/13081), done.
[31510:31508 - 0:1032] 01:16:52 [root@gb-slo-svb-0139:o +1] /tmp $
</code></pre></div>
<p dir="auto">I've tried the <code class="notranslate">git config --global https.proxy &lt;comeproxy&gt;</code> and also <code class="notranslate">git config --global url."git://".insteadOf https://"</code> , i've tried configuring environment variables in the shell. I've even tried issuing Pkg.init() with the full url, replacing https with git or http. I'm a bit stuck at the moment. I can't see any reason why this shouldn't work behind our proxy.</p>
<p dir="auto">Any ideas guys?</p>
<p dir="auto">Cheers,</p>
<p dir="auto">Morgan</p>
<p dir="auto">I'm seeing the following issue when trying to use <code class="notranslate">Pkg.init()</code> on a fresh build of master:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="$ ./julia 
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type &quot;?help&quot; for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+640 (2015-10-06 18:24 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 128f8c6 (0 days old master)
|__/                   |  x86_64-linux-gnu

julia&gt; Pkg.init()
INFO: Initializing package repository /home/lkuper/.julia/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:Net, SSL error: error:140E0114:SSL routines:SSL_shutdown:uninitialized)
 [inlined code] from libgit2/error.jl:96
 in clone at libgit2/repository.jl:185
 in clone at libgit2.jl:303
 in anonymous at pkg/dir.jl:49
 in cd at file.jl:22
 in init at pkg/dir.jl:47
 in init at pkg.jl:23"><pre class="notranslate"><code class="notranslate">$ ./julia 
               _
   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-dev+640 (2015-10-06 18:24 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit 128f8c6 (0 days old master)
|__/                   |  x86_64-linux-gnu

julia&gt; Pkg.init()
INFO: Initializing package repository /home/lkuper/.julia/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:Net, SSL error: error:140E0114:SSL routines:SSL_shutdown:uninitialized)
 [inlined code] from libgit2/error.jl:96
 in clone at libgit2/repository.jl:185
 in clone at libgit2.jl:303
 in anonymous at pkg/dir.jl:49
 in cd at file.jl:22
 in init at pkg/dir.jl:47
 in init at pkg.jl:23
</code></pre></div>
<p dir="auto">I started seeing this after pulling and rebuilding to fix the libgit2 SSL certificate issue in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="109228540" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/13399" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/13399/hovercard" href="https://github.com/JuliaLang/julia/issues/13399">#13399</a>.  I'm now seeing this error instead of the certificate error.  There's more discussion on that bug.</p>
<p dir="auto">This is on Ubuntu 14.04, and I have <code class="notranslate">libssl-dev</code> installed.  I've already tried <code class="notranslate">make -C deps distclean-libgit2</code>.  I even did a <code class="notranslate">make distcleanall</code> to make extra sure.</p>
<p dir="auto">Before I deleted my <code class="notranslate">~/.julia/v0.5</code> directory (because I hoped that doing that and running <code class="notranslate">Pkg.init()</code> might solve the problem), I was seeing a similar error message from <code class="notranslate">Pkg.update()</code>.</p>
<p dir="auto">I'm also having the same problem on CentOS with <code class="notranslate">openssl-devel</code> installed.</p>