I have a spring config server but i change the repository to a private one and i am trying to use a SSH authentication.
my application.yml its like this:
spring:
cloud:
config:
server:
git:
uri: git@github.com:server/repo.git
ignoreLocalSshSettings: true
hostKey: githostkey
hostKeyAlgorithm: ssh-rsa
strictHostKeyChecking: true
passphrase: passphrase
privateKey : |
-----BEGIN RSA PRIVATE KEY-----
...............................
-----END RSA PRIVATE KEY-----
but i get this error when the config server try to connect to the repo:
"org.eclipse.jgit.errors.NoRemoteRepositoryException:
git@github.com:server/repo.git: ERROR: You're using an RSA key with SHA-1, which is
no longer allowed. Please use a newer client or a different key type."
spring cloud documentation here
recommend use "ssh-keygen -m PEM -t rsa -b 4096 -f ~/config_server_deploy_key.rsa" to create a key pair in the correct format and i added the public key to SSH keys in my github repo.
i check the generated key with 'ssh -i ~/.ssh/config_server_deploy_key.rsa git@github.com' and i got:
Hi user! You've successfully authenticated, but GitHub does not provide shell
access.
Connection to github.com closed.
but git expose here that SHA-1 SSH is not sopported, supporting the exception I get at first place.
i am trying to use 'ssh-keygen -m PEM -t rsa-sha2-512 -C "myemail@server.com"' to generate a valid key but i have the same issue.
anyone can give me a clue?