2024-##-##T##:##:##.##Z INFO 6 --- [ctor-http-nio-2] i.p.s.c.mirrorservice.mirrors.ShellUtil : Load key "/var/vcap/store/mirror/####/private-key": error in libcrypto2024-##-##T##:##:##.##Z INFO 6 --- [ctor-http-nio-2] i.p.s.c.mirrorservice.mirrors.ShellUtil : ###@example.com: Permission denied (publickey).2024-##-##T##:##:##.##Z INFO 6 --- [ctor-http-nio-2] i.p.s.c.mirrorservice.mirrors.ShellUtil : fatal: Could not read from remote repository. |
The "error in libcrypto" message typically indicates an issue with the OpenSSL library, which is used for cryptographic operations.This error can occur for various reasons, such as:
Incorrect or corrupted key files: If the private or public key files are corrupted or not in the expected format, OpenSSL may fail to load them, resulting in this error.
Passphrase issues: If a passphrase is required for the key and it is incorrect or not provided, OpenSSL may report this error.
/var/vcap/data/packages/git/####/bin/git -c "core.sshCommand=ssh -i /tmp/your_current_private_key -o StrictHostKeyChecking=no" clone ssh://####@example.com:####/your_repository |
If it returned error, it is recommended to generate a new key file with the following command as an example to fix this issue.
ssh-keygen -t ed25519 -C "[email protected]" |
Once the new key is ready, the config-server service instance can be refreshed with the following command,
cf update-service config-server -c '{"git": { "uri": "[email protected]/spring-cloud-services-samples/cook.git", "hostKey": "EXAMPLEcccc1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+...", "hostKeyAlgorithm": "ssh-rsa", "privateKey": "-----BEGIN EXAMPLE RSA PRIVATE KEY-----\nMIIJKQIB..."} }' |