windows - github在windows上生成ssh key

标签 windows git github ssh

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

我正在按照以下说明生成 ssh key :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

最佳答案

正如我在 Where is git.exe located? 内的“GitHub for Windows ”中提到的那样,你已经为你安装了这个应用程序的可移植 git。
您需要打开一个 bash git session 才能使用 ssh 命令。
这些设置允许您定义 kind of shell you want :
shells

GH4W is a sandboxed installation of Git and the GitHub application that takes care of all that configuration. Please note, it will not mess with your existing Git environment if you have one. There will be two shortcuts installed on your machine, one for the GH4W application and another labeled “Git Shell”.

The Git Shell shortcut launches the shell of your choice as configured within the GH4W application’s options menu. You can also launch the shell from within the application for any given repository.

By default, this is PowerShell but you can change it to Bash, Cmd, or even a custom option.


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

关于windows - github在windows上生成ssh key ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17456194/

相关文章:

javascript - 使用 Github API 获取版本的所有提交部分

maven-2 - Maven 项目 - github

c - 求串口读取例子

Git commit 在我的案例中

c# - 所有 Process* 方法和所有消息过滤器的目的是什么?

git - 运行 Github Action 以使分支与主分支保持同步

git - 不可能用特殊字符 git rm

Heroku golang 示例应用程序失败

c++ - 一万个单位圆以上,如何画出高性能?

用于更改音轨的 Windows API