1

I am creating a powershell script to easily a group of tools include git. I have install git but the problem is I need to open the git bash prompt and pass in a command that will generate SSH keys.

How can I open the git bash prompt and pass the desired values?

1 Answer 1

1

If you are not protecting your private key with a passphrase, you could use Powershell directly to call ssh-keygen, without having to call the git bash first.

See for instance "automate ssh-keygen for github in powershell":

# Create your GitHub SSH Key
$MyEmailAddress = "[email protected]"
if (! (Test-Path  ("~/.ssh/id_rsa_test"))){
    ssh-keygen -t rsa -C "$MyEmailAddress" -f "id_rsa_test" -P """"

}
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.