Hi,
This does not seem to be a Git question at all. And the web has a lot of
answers for this question, e.g
https://stackoverflow.com/a/44474607/1860823:
You can generate a public-private keypair with the genrsa context (the
last number is the keylength in bits):
openssl genrsa -out keypair.pem 2048
To extract the public part, use the rsa context:
openssl rsa -in keypair.pem -pubout -out publickey.crt
Finally, convert the original keypair to PKCS#8 format with the pkcs8
context:
openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in keypair.pem -out pkcs8.key
Ciao,
Johannes
On Fri, 23 Feb 2024, Gilliard Santos wrote:
> [image: 😀] Hello Git Community, how are you? [image: 😀]
>
> - The Git Bash Terminal Installer includes OpenSSL, and my OpenSSL version
> is *3.1.4 (24 Oct 2023) (Library: OpenSSL 3.1.4 24 Oct 2023)*.
>
> - How can I generate a public or private key using Git Bash?
>
> Thank you all.
>
> --
> You received this message because you are subscribed to the Google Groups "git-for-windows" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
git-for-windo...@googlegroups.com.
> To view this discussion on the web visit
https://groups.google.com/d/msgid/git-for-windows/c9ff5975-d240-4e49-b616-f3189230a383n%40googlegroups.com.
>