Pkg.add not working

Hi,

I tried to run a julia script with a single line
Pkg.add(“JuMP”)

Upon running this script with “julia .jl”, I get the following weird error:

julia> Pkg.add(“JuMP”)
INFO: Initializing package repository /home/rcf-40/amulyaya/.julia/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:None, No errors)
in macro expansion at ./libgit2/error.jl:99 [inlined]
in clone(::String, ::String, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:191
in #clone#112(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::String) at ./libgit2/libgit2.jl:327
in (::Base.LibGit2.#kw##clone)(::Array{Any,1}, ::Base.LibGit2.#clone, ::String, ::String) at ./:0
in (::Base.Pkg.Dir.##4#6{String,String})() at ./pkg/dir.jl:49
in cd(::Base.Pkg.Dir.##4#6{String,String}, ::String) at ./file.jl:59
in init(::String, ::String) at ./pkg/dir.jl:47
in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:28
in add(::String) at ./pkg/pkg.jl:100

Does anyone have any idea how to fix this?

Looks like Julia is having an issue creating its METADATA directory from GitHub. I presume /home/rcf-40/amulyaya is your home directory? If so, does ~/.julia/v0.5/ exist? Do you have write permissions to your home directory (and space on the drive where your home directory is located)? How about ~/.julia/v0.5/METADATA/? If that exists, what happens if you cd into it and run git status?

The issue was that in trying to create the METADATA directory, my laptop was running out of space. I deleted some files and it worked like a charm.

Thanks for the help!