Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pkg.clone error when password is needed #17569

Closed
davidanthoff opened this issue Jul 22, 2016 · 20 comments
Closed

Pkg.clone error when password is needed #17569

davidanthoff opened this issue Jul 22, 2016 · 20 comments
Labels
help wanted Indicates that a maintainer wants help on an issue or pull request libgit2 The libgit2 library or the LibGit2 stdlib module packages Package management and loading

Comments

@davidanthoff
Copy link
Contributor

On Ubuntu 16.04. I can repo sometimes, but sometimes everything just works, a bit sporadic and I haven't figured out when it works and when it doesn't work.

   _       _ _(_)_     |  A fresh approach to technical computing
  (_)     | (_) (_)    |  Documentation: http://docs.julialang.org
   _ _   _| |_  __ _   |  Type "?help" for help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 0.5.0-pre+5635 (2016-07-22 21:06 UTC)
 _/ |\__'_|_|_|\__'_|  |  Commit f331e02 (0 days old master)
|__/                   |  x86_64-linux-gnu

julia> Pkg.clone("https://github.com/davidanthoff/Judyp.jl.git")
INFO: Cloning Judyp from https://github.com/davidanthoff/Judyp.jl.git
Username for 'https://github.com':davidanthoff
Password for 'https://[email protected]':
ERROR: GitError(Code:ERROR, Class:Net, SSL error: unknown error)
 in macro expansion at ./libgit2/error.jl:98 [inlined]
 in clone(::String, ::SubString{String}, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:191
 in #clone#105(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractPayload}, ::Function, ::String, ::SubString{String}) at ./libgit2/libgit2.jl:308
 in clone(::String, ::SubString{String}) at ./pkg/entry.jl:195
 in clone(::String) at ./pkg/entry.jl:221
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}})() at ./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}}, ::String) at ./file.jl:59
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31
 in clone(::String) at ./pkg/pkg.jl:151
 in eval(::Module, ::Any) at ./boot.jl:234
 in macro expansion at ./REPL.jl:92 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:46

julia> 
@Keno
Copy link
Member

Keno commented Jul 22, 2016

Same issue as before, GitHub hangs up the connection if you take too long to enter the password. Before it would hang, now you get this. Ideally libgit2 would allow us to retry.

@tkelman tkelman added the libgit2 The libgit2 library or the LibGit2 stdlib module label Jul 23, 2016
@tkelman
Copy link
Contributor

tkelman commented Jul 23, 2016

similar to #17353

@wildart
Copy link
Member

wildart commented Jul 23, 2016

Confirm, this is connectivity issue. But #17353 is different.

@tkelman
Copy link
Contributor

tkelman commented Jul 23, 2016

retries are also likely needed to fix #16555

@JeffBezanson JeffBezanson added the packages Package management and loading label Jul 26, 2016
@baggepinnen
Copy link
Contributor

baggepinnen commented Aug 7, 2016

I also experience errors with Pkg.clone(). I can not tell if they are related, error messages differ. I can also mention that the error occurs immediately after I run the command Pkg.clone(), i.e. no wait time for passwords etc.

When cloning via ssh

ERROR: GitError(Code:ERROR, Class:SSH, Failed to start SSH session: Unable to exchange encryption keys)
 in macro expansion at ./libgit2/error.jl:98 [inlined]
 in clone(::String, ::SubString{String}, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:191
 in #clone#109(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractPayload}, ::Function, ::String, ::SubString{String}) at ./libgit2/libgit2.jl:320
 in clone(::String, ::SubString{String}) at ./pkg/entry.jl:195
 in clone(::String) at ./pkg/entry.jl:221
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}})() at ./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}}, ::String) at ./file.jl:59
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31
 in clone(::String) at ./pkg/pkg.jl:151

When cloning via https

ERROR: GitError(Code:EAUTH, Class:None, No errors)
 in macro expansion at ./libgit2/error.jl:98 [inlined]
 in clone(::String, ::SubString{String}, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:191
 in #clone#109(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractPayload}, ::Function, ::String, ::SubString{String}) at ./libgit2/libgit2.jl:320
 in clone(::String, ::SubString{String}) at ./pkg/entry.jl:195
 in clone(::String) at ./pkg/entry.jl:221
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}})() at ./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}}, ::String) at ./file.jl:59
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31
 in clone(::String) at ./pkg/pkg.jl:151
julia> versioninfo()
Julia Version 0.5.0-rc1+1
Commit acfd04c (2016-08-05 15:23 UTC)
Platform Info:
  System: Linux (x86_64-unknown-linux-gnu)
  CPU: Intel(R) Core(TM) i5-2500K CPU @ 3.30GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, sandybridge)

Ubuntu 16.04

@wildart
Copy link
Member

wildart commented Aug 8, 2016

@baggepinnen For https connection, you have incorrect credentials. If you use 2FA, it's probably auth. token related. As of ssh, what is you key type and size?

@Keno
Copy link
Member

Keno commented Aug 8, 2016

HTTPS error may also be #17860

@baggepinnen
Copy link
Contributor

My credentials work fine for my 0.4.5 installation, and I have not yet entered any for the fresh 0.5.0 installation.
My ssh key is of type 2048 SHA256 (RSA), if that makes sense?

@Keno
Copy link
Member

Keno commented Aug 8, 2016

Looking at the SSH error again, it happens during kex which is earlier than userauth. What remote are you connecting to? GitHub?

@baggepinnen
Copy link
Contributor

baggepinnen commented Aug 8, 2016

I'm connecting to a gitlab server we have at work. The server works well for Julia 0.4.6 and otherwise.

@ViralBShah ViralBShah added this to the 0.5.x milestone Aug 8, 2016
@Keno
Copy link
Member

Keno commented Aug 8, 2016

Ok, I wouldn't be surprised if that issue is #17772 then.

@vchuravy
Copy link
Member

vchuravy commented Sep 16, 2016

I just encountered this and I was wondering. Why does Pkg.clone require a username and password?

Also I am getting a syscall failure (on power here):

julia> Pkg.clone("https://github.com/JuliaGPU/CUDAnative")
INFO: Cloning CUDAnative from https://github.com/JuliaGPU/CUDAnative
Username for 'https://github.com':vchuravy
Password for 'https://[email protected]':
ERROR: GitError(Code:ERROR, Class:OS, SSL error: syscall failure: )
 in macro expansion at ./libgit2/error.jl:99 [inlined]
 in clone(::String, ::SubString{String}, ::Base.LibGit2.CloneOptions) at ./libgit2/repository.jl:190
 in #clone#109(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::SubString{String}) at ./libgit2/libgit2.jl:327
 in clone(::String, ::SubString{String}) at ./pkg/entry.jl:195
 in clone(::String) at ./pkg/entry.jl:221
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}})() at ./pkg/dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}}, ::String) at ./file.jl:69
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at ./pkg/dir.jl:31
 in clone(::String) at ./pkg/pkg.jl:151

The problem here was that the URL was wrong...

@Keno
Copy link
Member

Keno commented Sep 16, 2016

It doesn't, try Pkg.clone("https://github.com/JuliaGPU/CUDAnative.jl"). It asks for username/password in case there's a private repo of that name that you can't see without logging in.

@vchuravy
Copy link
Member

Yeah I figured as much. Sorry for the noise, but the behaviour confused me.

@krcools
Copy link

krcools commented Oct 16, 2016

I am seeing the same behavior as @baggepinnen on:

Julia Version 0.5.0
Commit 3c9d753 (2016-09-19 18:14 UTC)
Platform Info:
  System: NT (x86_64-w64-mingw32)
  CPU: Intel(R) Xeon(R) CPU E5-1620 v3 @ 3.50GHz
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell)
  LAPACK: libopenblas64_
  LIBM: libopenlibm
  LLVM: libLLVM-3.7.1 (ORCJIT, haswell)

when trying Pkg.clone("[email protected]...").

ERROR: GitError(Code:ERROR, Class:SSH, Failed to start SSH session: Unable to exchange encryption keys)
 in macro expansion at .\libgit2\error.jl:99 [inlined]
 in clone(::String, ::SubString{String}, ::Base.LibGit2.CloneOptions) at .\libgit2\repository.jl:191
 in #clone#109(::String, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractCredentials}, ::Function, ::String, ::SubString{String}) at .\libgit2\libgit2.jl:327
 in clone(::String, ::SubString{String}) at .\pkg\entry.jl:195
 in clone(::String) at .\pkg\entry.jl:221
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}})() at .\pkg\dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{String}}, ::String) at .\file.jl:48
 in #cd#1(::Array{Any,1}, ::Function, ::Function, ::String, ::Vararg{Any,N}) at .\pkg\dir.jl:31
 in clone(::String) at .\pkg\pkg.jl:151

Cloning over ssh from github and bitbucket works just fine.

@StefanKarpinski StefanKarpinski added help wanted Indicates that a maintainer wants help on an issue or pull request and removed help wanted Indicates that a maintainer wants help on an issue or pull request labels Oct 27, 2016
@tkelman
Copy link
Contributor

tkelman commented Mar 5, 2017

Are people still having these issues?

@krcools
Copy link

krcools commented Mar 6, 2017

Yes, only when cloning from GitLab. Not this thread's topic I know, but how strongly is Julia and its package eco-system tied in with GitHub?

On v0.6 I see #20695, independent of the hosting service.

@BoundaryValueProblems
Copy link

I have exactly the same problem of GitError(Code:ERROR, Class:SSH, Failed to start SSH session: Unable to exchage encription keys when I use Pkg.clone("[email protected]:...") on my Windows machine. If I use https instead of ssh/git, then it works (though I have to type my username/password for my GitLab account). Interestingly, I do not have any problems with my Mac OS X and Ubuntu/Linux machines. I am using julia v0.5.1.

@InfoSec812
Copy link

I am seeing this on Ubuntu 17.10 x86_64:

julia> Pkg.add("Winston ")
INFO: Initializing package repository /home/dphillips/.julia/v0.5
INFO: Cloning METADATA from https://github.com/JuliaLang/METADATA.jl
ERROR: GitError(Code:ERROR, Class:Net, SSL error: unknown error)
 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 ./<missing>: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

@JeffBezanson JeffBezanson changed the title Pkg.clone error Pkg.clone error when password is needed May 21, 2018
@JeffBezanson JeffBezanson removed this from the 0.5.x milestone May 21, 2018
@oxinabox
Copy link
Contributor

oxinabox commented Feb 6, 2019

Can this be closed now?
I feel like since the Package manager has been replaced and the libgit2 version changed,
odds are this has been fixed.
If not a fresh example is wanted to prove otherwise

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Indicates that a maintainer wants help on an issue or pull request libgit2 The libgit2 library or the LibGit2 stdlib module packages Package management and loading
Projects
None yet
Development

No branches or pull requests