How to specify the SSH key for Pkg to use

If you already have the key in the default location, setting SSH_KEY_PATH and SSH_PUB_KEY_PATH won’t help. It is unfortunate that it keeps asking for private key location when what it really means is that something, anything, went wrong during the authentication, and frequently the location of the key is not at all the problem.

Sadly it’s not that easy to debug this. If you have control of the server end you may be able to enable debug output from the ssh server and possibly make sense of it. If you cannot get information from the server and you are sufficiently desperate you can try https://github.com/JuliaLang/Pkg.jl/issues/1516#issuecomment-560794389.

1 Like