2013-07-03 21 views
1

Windows 7旗艦版,Git版本1.8.0.msysgit.0github上生成的Windows

我按照下列指示,生成SSH密鑰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 
+3

您需要使用「Git bash」而不是命令行或Powershell來完成這些命令 –

回答

1

正如我在提「Where is git.exe located?」在GitHub for Windows之內,你有一個便攜式的git爲你安裝這個應用程序。

您需要打開bash git會話才能使用ssh命令。

設置允許您定義kind of shell you want

shells

GH4W是Git和GitHub的應用程序,它需要所有配置的照顧沙盒的安裝。請注意,如果您有現成的Git環境,它不會混淆您的現有環境。您的機器上將安裝兩個快捷方式,一個用於GH4W應用程序,另一個用於標記「Git Shell」。

Git Shell快捷方式根據GH4W應用程序的選項菜單中的配置啓動您選擇的shell。您還可以從應用程序中爲任何給定的存儲庫啓動shell。

默認情況下,這是PowerShell,但您可以將其更改爲Bash,Cmd或甚至自定義選項。

選擇Git Bash,你應該能夠執行你的腳本。