将SSH密钥添加到剪贴板的Powershell/github问题

Toh*_*mas 7 powershell github

我正在尝试将我的SSH密钥添加到Github,但是我遇到了一个问题:

我尝试在Windows Powershell中运行以下命令来获取密钥:

clip < ~/.ssh/id_rsa.pub
Run Code Online (Sandbox Code Playgroud)

但是我收到以下错误:

The '<' operator is reserved for future use.
Run Code Online (Sandbox Code Playgroud)

有办法解决这个问题吗?

Adr*_*lor 12

cat ~/.ssh/id_rsa.pub | clip 应该管用.

更一般地说,如果您希望使用旧的命令提示符语法运行某些东西,您可以cmd /c像这样将它包装起来:cmd /c "clip < ~/.ssh/ida_rsa.pub".