当前位置: 动力学知识库 > 问答 > 编程问答 >

git - github generate ssh key on windows

问题描述:

Windows 7 Ultimate , git version 1.8.0.msysgit.0

I'm following these directions to generate an 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

网友答案:

As I mention in "Where is git.exe located?" within GitHub for Windows, you have a portable git installed for you with this application.

You need to open a bash git session in order to use ssh commands.

The settings allow you to define the kind of shell you want:

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.

Choose Git Bash and you should be able to execute your script.

分享给朋友:
您可能感兴趣的文章:
随机阅读: