Hello,
I am running Julia 0.7 on Ubuntu and when I try to clone a package, I get this problem:
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`
Private key location for 'git@github.com': /home/duc299/.ssh/id_ed25519
Private key location for 'git@github.com' [/home/duc299/.ssh/id_ed25519]: /home/duc299/.ssh/id_ed25519
Private key location for 'git@github.com' [/home/duc299/.ssh/id_ed25519]: /home/duc299/.ssh/id_ed25519
ERROR: failed to clone from git@github.com:eford/CORBITS.git, error: GitError(Code:EAUTH, Class:Callback, Aborting, maximum number of prompts reached.)
Stacktrace:
[1] pkgerror(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:120
[2] #clone#2(::Nothing, ::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}, ::Function, ::String, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/GitTools.jl:102
[3] clone at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/GitTools.jl:83 [inlined]
[4] (::getfield(Pkg.Types, Symbol("##25#28")){Pkg.Types.Context,Array{Pkg.Types.PackageSpec,1},String})(::LibGit2.CachedCredentials) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:533
[5] shred!(::getfield(Pkg.Types, Symbol("##25#28")){Pkg.Types.Context,Array{Pkg.Types.PackageSpec,1},String}, ::LibGit2.CachedCredentials) at ./secretbuffer.jl:184
[6] handle_repos_develop! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/Types.jl:498 [inlined]
[7] #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/v0.7/Pkg/src/API.jl:52
[8] #add_or_develop at ./none:0 [inlined]
[9] #develop#19 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:70 [inlined]
[10] develop at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:70 [inlined]
[11] macro expansion at ./logging.jl:310 [inlined]
[12] clone(::String, ::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v0.7/Pkg/src/API.jl:445 (repeats 2 times)
[13] top-level scope at none:0
So it keeps asking me for my SSH key and it won’t listen to me when I tell it where the SSH key is. Also, regular git seems to work fine:
~ % ls -ld .ssh
drwx------ 2 duc299 duc299 146 Sep 19 01:10 .ssh/
~ %
~ % ls -l .ssh/id_ed25519*
-rw------- 1 duc299 duc299 411 Sep 19 00:59 .ssh/id_ed25519
-rw-r--r-- 1 duc299 duc299 98 Sep 19 00:59 .ssh/id_ed25519.pub
~ %
~ % cd tmp
~/tmp %
~/tmp % git clone git@github.com:eford/CORBITS.git
Cloning into 'CORBITS'...
Warning: Permanently added the RSA host key for IP address '192.30.253.112' to the list of known hosts.
remote: Counting objects: 405, done.
remote: Compressing objects: 100% (9/9), done.
remote: Total 405 (delta 3), reused 13 (delta 3), pack-reused 389
Receiving objects: 100% (405/405), 85.34 KiB | 1.09 MiB/s, done.
Resolving deltas: 100% (210/210), done.
So the problem does not seem to be specifically with git. Also, the Pkg.clone line worked in two other computers. So I’m completely stuck. Why can’t Pkg.clone call git like on the command line? What’s missing?