Pkg.jl: Pkg asks for github credentials for private repos

Created on 11 Jul 2018  路  7Comments  路  Source: JuliaLang/Pkg.jl

With #430, the package manager on up asks for my github username / password for all private github [email protected]/... repos.

up works for me again after setprotocol!(nothing), which seems to restore the previous behaviour, i.e. use the SSH keys set up with github to perform the authentication.

May I suggest nothing as the default, and / or a more elaborate form along the lines of mapprotocol = Dict("http" => "https", "git" => "git") which allows per-protocol control?

Most helpful comment

The old package manager had:

https://github.com/JuliaLang/julia/blob/f3ad0678b3c7b1b4bfdc66a093bd37907faa40dc/stdlib/OldPkg/src/cache.jl#L9

which seems like it would rewrite it to https by default.

Anyway, no one really complained about the old behavior we had here, so I'll swap back the default.

All 7 comments

I was just trying to reproduce what the old package manager used. So with the old package manager it did not ask you?

Neither the old package manager (0.4-0.6) nor Pkg3 until #430 asked for the credentials.

The issue comes (I believe) from the fact that all protocols are replaced to use https (the current default value). Using nothing lets the package manager decide (as stated in docs), so it just uses the protocols stated in Manifest.toml - git for git, http for http and https for https.

The credentials being asked for are for the HTTP(S) authentication when accessing https://github.com/X instead of git@github..., which would use the SSH keys.

The old package manager had:

https://github.com/JuliaLang/julia/blob/f3ad0678b3c7b1b4bfdc66a093bd37907faa40dc/stdlib/OldPkg/src/cache.jl#L9

which seems like it would rewrite it to https by default.

Anyway, no one really complained about the old behavior we had here, so I'll swap back the default.

@KristofferC get we get this merged into base before the beta2 tag? I would expect a lot of people to hit this.

Done

Was this page helpful?
0 / 5 - 0 ratings