I can expand on this.
-
JULIA_PKG_USE_CLI_GIT
is the preferred solution and documented in https://github.com/GunnarFarneback/LocalRegistry.jl/blob/master/docs/ssh_keys.md#2-using-an-external-git-binary-with-julias-package-manager. The main limitation is that it’s only available from Julia 1.7 and, obviously, requires an externalgit
installation. -
ssh-keygen -t rsa -b 4096 -m PEM
still generates a key which Julia Pkg can use withlibgit2
/libssh2
. However, GitHub will not accept the key, but if you’re using it with other git services they may be more accepting. - There is no other key type that can be used with existing Julia binary downloads through
libgit2
/libssh2
. Although version 1.9.0 oflibssh2
does support ECDSA keys, that requires a specific crypto backend, which is not the one Julia is built with. - If you build Julia yourself, it should be possible to configure it so that
libssh2
understands ECDSA keys. -
libssh2
master1.10.0 contains support for ECDSA keys with thembedtls
backend, which Julia uses, assuming everything is built with the appropriate feature enabled.This may eventually make its way into Julia’s binary downloads.This will be available for Julia 1.8 and later (and is already available in Julia 1.8-beta1). You may want to set the environment variableSSH_KEY_PATH
to point to your ECDSA key. - If you do try to use a non-RSA key with Julia you will get repeatedly prompted for the key location. The first time this is because it indeed doesn’t know where the key is (unless you have told it with
SSH_KEY_PATH
andSSH_PUB_KEY_PATH
) but all the following times it is becauselibssh2
hasn’t been built with support for reading the key. Yes, this is a very unhelpful behavior and you can only find out what’s going on by patchinglibssh2
. - See item 1.
There’s a possibility that this option could be backported to a future 1.6.x release. This has been backported and will be available in Julia 1.6.6.