Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
使用Powershell打开并将值传递给Git Bash_Git_Powershell_Ssh Keygen - Fatal编程技术网

使用Powershell打开并将值传递给Git Bash

使用Powershell打开并将值传递给Git Bash,git,powershell,ssh-keygen,Git,Powershell,Ssh Keygen,我正在创建一个powershell脚本,以轻松创建一组包括git在内的工具。我已经安装了git,但问题是我需要打开GitBash提示符并传入一个生成SSH密钥的命令 如何打开git bash提示符并传递所需的值?如果您不使用密码短语保护私钥,则可以直接使用Powershell调用ssh keygen,而无需先调用git bash 例如见“”: # Create your GitHub SSH Key $MyEmailAddress = "some.user@github.com" if (! (

我正在创建一个powershell脚本,以轻松创建一组包括git在内的工具。我已经安装了git,但问题是我需要打开GitBash提示符并传入一个生成SSH密钥的命令


如何打开git bash提示符并传递所需的值?

如果您不使用密码短语保护私钥,则可以直接使用Powershell调用ssh keygen,而无需先调用git bash

例如见“”:

# Create your GitHub SSH Key
$MyEmailAddress = "some.user@github.com"
if (! (Test-Path  ("~/.ssh/id_rsa_test"))){
    ssh-keygen -t rsa -C "$MyEmailAddress" -f "id_rsa_test" -P """"

}