Pkg.clone keeps asking for my SSH key

I found a magic incantation online. I don’t know what this does, but it worked:

~/.ssh % eval $(ssh-agent) > /dev/null
~/.ssh % ssh-add id_ed25519
~/.ssh % ssh-add -l
256 SHA256:GBqs+SzszuFd8PdgDo34UYzOVGSgIIQ6QuI6ecyJ4bA duc299@e1-052367 (ED25519)
...
julia> using Pkg

julia> Pkg.clone("git@github.com:eford/CORBITS.git")
┌ Warning: Pkg.clone is only kept for legacy CI script reasons, please use `add`
└ @ Pkg.API /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:445
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
   Cloning git-repo `git@github.com:eford/CORBITS.git`
  Updating git-repo `git@github.com:eford/CORBITS.git`
[ Info: Assigning UUID 811cb5c5-b78b-5ed9-b25f-8f0cd4e719fe to CORBITS
 Resolving package versions...
  Updating `~/.julia/environments/v0.7/Project.toml`
  [811cb5c5] + CORBITS v0.0.0 [`~/.julia/dev/CORBITS`]
  Updating `~/.julia/environments/v0.7/Manifest.toml`
  [811cb5c5] + CORBITS v0.0.0 [`~/.julia/dev/CORBITS`]

So the immediate issue is resolved. It’d be good to not have to go through this, or at least understand what exactly I just did. Just running ssh-agent on the shell didn’t work. That “eval” bit seems to be required.

4 Likes