Cannot install packages (git protocol blocked by firewall)

1,647 views
Skip to first unread message

Ian Fiske

unread,
Jan 30, 2013, 11:37:56 AM1/30/13
to juli...@googlegroups.com
I have just cloned the latest and greatest of julia and am trying to install packages for the first time.  I get this:

julia> Pkg.init()
Initialized empty Git repository in /home/ijf0jnf/.julia/.git/
[master (root-commit) 4755a00] Initial empty commit
Initialized empty Git repository in /home/ijf0jnf/.julia/METADATA/.git/
github.com[0: 207.97.227.239]: errno=Connection timed out
fatal: unable to connect a socket (Connection timed out)
Clone of 'git://github.com/JuliaLang/METADATA.jl.git' into submodule path 'METADATA' failed
failed process: Process(`git submodule add git://github.com/JuliaLang/METADATA.jl.git METADATA`, ProcessExited(1)) [1]
 in pipeline_error at process.jl:387
 in run at process.jl:377
 in anonymous at no file:86
 in cd at file.jl:26
 in init at pkg.jl:68
 in init at pkg.jl:96

In order to build julia at my work, I needed to change from the git protocol to https in the git config files in order to pull the submodules.  This worked, but how can I do a similar thing for the package installer?  There are references (https://github.com/JuliaLang/julia/pull/1668#issuecomment-11135436 and https://github.com/JuliaLang/julia/issues/1675#issuecomment-11004742) to this problem, but no solution that I have seen.  My git knowledge is newb-level, so this might be part of the problem.

Thanks!
Ian

Stefan Karpinski

unread,
Jan 30, 2013, 12:51:09 PM1/30/13
to juli...@googlegroups.com
This is a significant problem. We're doing a bit of a Bay Area Julia tour but when we get back to MIT, an overhaul of package stuff, including this is my first priority.

Stefan Karpinski

unread,
Jan 30, 2013, 2:20:49 PM1/30/13
to juli...@googlegroups.com
This is a significant problem. We're doing a bit of a Bay Area Julia tour but when we get back to MIT, an overhaul of package stuff, including this is my first priority.

On Wednesday, January 30, 2013, Ian Fiske wrote:

Ian Fiske

unread,
Jan 30, 2013, 3:29:38 PM1/30/13
to juli...@googlegroups.com
Thank you.  Those changes will be appreciated.  In the meantime, is there any workaround for me to install a package manually if I can git clone it myself?

Jacob Quinn

unread,
Jan 30, 2013, 3:30:05 PM1/30/13
to juli...@googlegroups.com
The below command works for me (run in Julia)

run(`git config --global url."https://".insteadOf git://`)

John Myles White

unread,
Jan 30, 2013, 3:31:31 PM1/30/13
to juli...@googlegroups.com
Yeah, you can totally circumvent the package system as follows:

Find the package's URL
Run git clone on that URL to produce a directory like PACKAGE_NAME.jl
Then run (using Unix commands):

mv PACKAGE_NAME.jl ~/.julia/PACKAGE_NAME

Notice that we drop the .jl from the end of the package name when placing the directory inside of ~/.julia

Loading code just searches that folder, so there's no actual requirement that you use the package system to make it work.

 -- John

Ian Fiske

unread,
Jan 30, 2013, 4:26:07 PM1/30/13
to juli...@googlegroups.com
Thank you, John and Jacob.  I ran Jacob's command.  Now, Pkg.init() and Pkg.add(...) work perfectly.

Patrick O'Leary

unread,
Jan 30, 2013, 4:26:40 PM1/30/13
to juli...@googlegroups.com
!!!

I can't believe no one thought to check the git config options, myself included.

Documented here: http://git-scm.com/docs/git-config (search page for "insteadof")

Juan Manuel Truppia

unread,
Jul 23, 2013, 12:03:17 PM7/23/13
to juli...@googlegroups.com
Also solved the issue after running Jacob's command and then setting the http.proxy git global variable (all from inside julia using run, doing it from the bash inside the julia folder didn't work)

Simon Kornblith

unread,
Jul 23, 2013, 2:11:39 PM7/23/13
to juli...@googlegroups.com
Maybe we should just switch to https:// URLs in METADATA.jl? It looks like GitHub doesn't even show git:// URLs on repo pages anymore.

Stefan Karpinski

unread,
Jul 23, 2013, 2:24:49 PM7/23/13
to Julia Dev
Can you push over HTTPS URLs?

Simon Kornblith

unread,
Jul 23, 2013, 2:33:59 PM7/23/13
to juli...@googlegroups.com
You can push with https:// URLs or SSH URLs, but not with git://.
Reply all
Reply to author
Forward
0 new messages