【问题标题】:Using Powershell open and pass values to Git Bash使用 Powershell 打开并将值传递给 Git Bash
【发布时间】:2014-07-08 04:00:06
【问题描述】:

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

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

【问题讨论】:

    标签: git powershell ssh-keygen


    【解决方案1】:

    如果您没有使用密码保护您的私钥,您可以直接使用 Powershell 调用 ssh-keygen,而无需先调用 git bash。

    例如见“automate ssh-keygen for github in powershell”:

    # 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 """"
    
    }
    

    【讨论】:

      猜你喜欢
      • 2023-04-03
      • 2017-02-25
      • 2023-04-05
      • 2020-08-01
      • 1970-01-01
      • 1970-01-01
      • 2021-03-01
      • 1970-01-01
      • 2017-06-24
      相关资源
      最近更新 更多