`UndefVarError: repo not defined` when add pkg on v1.0

I downloaded Julia binary and simlinked as julia-1.0.1.
When I try to add packages, the following error:

fushimi at step in ~
↪ julia-1.0.1
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.0.1 (2018-09-29)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(v1.0) pkg> add Distributions
  Updating registry at `~/.julia/registries/General`
ERROR: UndefVarError: repo not defined
Stacktrace:
 [1] update_registry(::Pkg.Types.Context) at /buildworker/worker/package_linux64/build/usr/share/julia
/stdlib/v1.0/Pkg/src/API.jl:123
 [2] #handle_repos_add!#32(::Bool, ::Nothing, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.Packa
geSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/Types.jl:6
07
 [3] #handle_repos_add! at ./none:0 [inlined]
 [4] #add_or_develop#13(::Symbol, ::Bool, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{()
,Tuple{}}}, ::Function, ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/
package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/API.jl:54
 [5] (::getfield(Pkg.API, Symbol("#kw##add_or_develop")))(::NamedTuple{(:mode,),Tuple{Symbol}}, ::type
of(Pkg.API.add_or_develop), ::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at ./none:0
 [6] do_add!(::Dict{Symbol,Any}, ::Array{Pkg.Types.PackageSpec,1}, ::Dict{Symbol,Any}) at /buildworker
/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:709
 [7] #invokelatest#1(::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Functio
n, ::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:697
 [8] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:696
 [9] do_cmd!(::Pkg.REPLMode.PkgCommand, ::REPL.LineEditREPL) at /buildworker/worker/package_linux64/bu
ild/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:603
 [10] #do_cmd#33(::Bool, ::Function, ::REPL.LineEditREPL, ::String) at /buildworker/worker/package_lin
ux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:577
 [11] do_cmd at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode
.jl:573 [inlined]
 [12] (::getfield(Pkg.REPLMode, Symbol("##44#47")){REPL.LineEditREPL,REPL.LineEdit.Prompt})(::REPL.Lin
eEdit.MIState, ::Base.GenericIOBuffer{Array{UInt8,1}}, ::Bool) at /buildworker/worker/package_linux64/
build/usr/share/julia/stdlib/v1.0/Pkg/src/REPLMode.jl:912
 [13] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [14] invokelatest at ./essentials.jl:696 [inlined]
 [15] run_interface(::REPL.Terminals.TextTerminal, ::REPL.LineEdit.ModalInterface, ::REPL.LineEdit.MIS
tate) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.0/REPL/src/LineEdit.jl:22
61
 [16] run_frontend(::REPL.LineEditREPL, ::REPL.REPLBackendRef) at /buildworker/worker/package_linux64/
build/usr/share/julia/stdlib/v1.0/REPL/src/REPL.jl:1029
 [17] run_repl(::REPL.AbstractREPL, ::Any) at /buildworker/worker/package_linux64/build/usr/share/juli
a/stdlib/v1.0/REPL/src/REPL.jl:191
 [18] (::getfield(Base, Symbol("##719#721")){Bool,Bool,Bool,Bool})(::Module) at ./logging.jl:311
 [19] #invokelatest#1 at ./essentials.jl:697 [inlined]
 [20] invokelatest at ./essentials.jl:696 [inlined]
 [21] macro expansion at ./logging.jl:308 [inlined]
 [22] run_main_repl(::Bool, ::Bool, ::Bool, ::Bool, ::Bool) at ./client.jl:330
 [23] exec_options(::Base.JLOptions) at ./client.jl:242
 [24] _start() at ./client.jl:421

appeared. What does it mean?

Looks like a bug, could you open an issue at https://github.com/JuliaLang/Pkg.jl.

I opened the issue.
https://github.com/JuliaLang/Pkg.jl/issues/806

I deleted all of the .julia directory and the used REPL with julia to load in
packages; this reconstructed most of everything in the new .julia directory.

You may need to add packages as you try new code.