【问题标题】:github generate ssh key on windowsgithub在windows上生成ssh密钥
【发布时间】:2013-11-21 23:13:45
【问题描述】:

Windows 7 Ultimate,git 版本 1.8.0.msysgit.0

我正在按照以下说明生成 ssh 密钥:https://help.github.com/articles/generating-ssh-keys

$clip < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard

The '<' operator is reserved for future use.
At line:1 char:7
+ clip < <<<<  ~/.ssh/id_rsa.pub
    + CategoryInfo          : ParserError: (<:OperatorToken) [], ParentContain
   sErrorRecordException
    + FullyQualifiedErrorId : RedirectionNotSupported

【问题讨论】:

  • 您需要使用“Git bash”而不是命令行或 Powershell 来完成这些命令

标签: windows git github ssh


【解决方案1】:

正如我在GitHub for Windows 中的“Where is git.exe located?”中提到的,您已经为您安装了一个可移植的 git 和此应用程序。

您需要打开一个 bash git 会话才能使用 ssh 命令。

这些设置允许您定义kind of shell you want:

GH4W 是 Git 的沙盒安装和负责所有配置的 GitHub 应用程序。请注意,如果你有一个,它不会弄乱你现有的 Git 环境。您的机器上将安装两个快捷方式,一个用于 GH4W 应用程序,另一个标记为“Git Shell”。

Git Shell 快捷方式会启动您在 GH4W 应用程序选项菜单中配置的所选 shell。您还可以在任何给定存储库的应用程序中启动 shell。

默认情况下,这是 PowerShell,但您可以将其更改为 Bash、Cmd 甚至自定义选项。

选择 Git Bash,您应该能够执行您的脚本。

【讨论】:

    猜你喜欢
    • 2015-03-26
    • 2017-04-30
    • 1970-01-01
    • 2015-04-06
    • 2016-01-19
    • 2020-06-14
    • 2022-01-04
    • 2021-12-08
    • 2011-07-27
    相关资源
    最近更新 更多