<p dir="auto">Julia 0.5 has removed all support for cloning private repos on Windows. In previous versions one could always clone private repos via SSH remote URLs, but support for the git protocol seems entirely removed. Cloning private repos via https also doesn't work on Windows, I get the following error:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR: ccall: could not find function getpass
 [inlined code] from .\c.jl:89
 in #prompt#1(::ASCIIString, ::Bool, ::Any, ::ASCIIString) at .\libgit2\utils.jl:17
 in credentials_callback(::Ptr{Ptr{Void}}, ::Cstring, ::Cstring, ::UInt32, ::Ptr{Void}) at .\libgit2\callbacks.jl:56
 [inlined code] from .\refpointer.jl:32
 in clone(::ASCIIString, ::SubString{UTF8String}, ::Base.LibGit2.CloneOptions) at .\libgit2\repository.jl:189
 in #clone#98(::ASCIIString, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractPayload}, ::Any, ::ASCIIString, ::SubString{UTF8String}) at .\libgit2.jl:310
 [inlined code] from .\base.jl:111
 in clone(::ASCIIString, ::SubString{UTF8String}) at .\pkg\entry.jl:195
 in clone(::ASCIIString) at .\pkg\entry.jl:221
 [inlined code] from .\promotion.jl:229
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{ASCIIString}})() at .\pkg\dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{ASCIIString}}, ::ASCIIString) at .\file.jl:58
 in #cd#1(::Array{Any,1}, ::Any, ::Any, ::ASCIIString, ::Vararg{ASCIIString}) at .\pkg\dir.jl:31
 in clone(::ASCIIString) at .\pkg.jl:128
 in eval(::Module, ::Any) at .\boot.jl:236"><pre class="notranslate"><code class="notranslate">ERROR: ccall: could not find function getpass
 [inlined code] from .\c.jl:89
 in #prompt#1(::ASCIIString, ::Bool, ::Any, ::ASCIIString) at .\libgit2\utils.jl:17
 in credentials_callback(::Ptr{Ptr{Void}}, ::Cstring, ::Cstring, ::UInt32, ::Ptr{Void}) at .\libgit2\callbacks.jl:56
 [inlined code] from .\refpointer.jl:32
 in clone(::ASCIIString, ::SubString{UTF8String}, ::Base.LibGit2.CloneOptions) at .\libgit2\repository.jl:189
 in #clone#98(::ASCIIString, ::Bool, ::Ptr{Void}, ::Nullable{Base.LibGit2.AbstractPayload}, ::Any, ::ASCIIString, ::SubString{UTF8String}) at .\libgit2.jl:310
 [inlined code] from .\base.jl:111
 in clone(::ASCIIString, ::SubString{UTF8String}) at .\pkg\entry.jl:195
 in clone(::ASCIIString) at .\pkg\entry.jl:221
 [inlined code] from .\promotion.jl:229
 in (::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{ASCIIString}})() at .\pkg\dir.jl:31
 in cd(::Base.Pkg.Dir.##2#3{Array{Any,1},Base.Pkg.Entry.#clone,Tuple{ASCIIString}}, ::ASCIIString) at .\file.jl:58
 in #cd#1(::Array{Any,1}, ::Any, ::Any, ::ASCIIString, ::Vararg{ASCIIString}) at .\pkg\dir.jl:31
 in clone(::ASCIIString) at .\pkg.jl:128
 in eval(::Module, ::Any) at .\boot.jl:236
</code></pre></div>
<p dir="auto">I think there are potentially two solutions:</p>
<ol dir="auto">
<li>Re-enable support for the git transport protocol</li>
<li>Fix the error with https connections on Windows (might be enough to fix <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="41900544" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/8228" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/8228/hovercard" href="https://github.com/JuliaLang/julia/issues/8228">#8228</a>)</li>
</ol>
<p dir="auto">I believe that only having 2) would be very painful, because my understanding is that every Pkg.update would for example query for the username/password combo for private repos, i.e. as far as I know there is no support for credential storage in libgit2, right?</p>
<p dir="auto">So I think if the git transport is not re-enabled, one would really also need integration with the git credential manager interface, so that https credentials that are stored in a registered git credential manager would be picked up by <code class="notranslate">Pkg.clone</code> and <code class="notranslate">Pkg.update</code>. My understanding is that libgit2 has no support for this, so it would probably have to be implemented manually...</p>
<p dir="auto">I think this issue here should get the 0.5.0 milestone attached. Not being able to work with private repos is a major regression relative to 0.4 that would affect essentially anyone who has package work in private repos.</p>
<p dir="auto"><del><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="24850641" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/5252" data-hovercard-type="issue" data-hovercard-url="/JuliaLang/julia/issues/5252/hovercard" href="https://github.com/JuliaLang/julia/issues/5252">#5252</a></del> <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="32309061" data-permission-text="Title is private" data-url="https://github.com/JuliaLang/julia/issues/6668" data-hovercard-type="pull_request" data-hovercard-url="/JuliaLang/julia/pull/6668/hovercard" href="https://github.com/JuliaLang/julia/pull/6668">#6668</a> added support for github two-factor authentication.  However, the implementation is a bit ugly: in the worst case, the user has to enter her password 4 times(!).</p>
<p dir="auto">The nicest way to handle this would probably be to implement a <code class="notranslate">getpasswd</code> (or <code class="notranslate">getpass</code>) function, which reads in a password without echoing, and then passes that onto curl via <code class="notranslate">curl -K -</code> (which reads a config file from stdin).</p>