为 github 生成 SSH 密钥:“zsh:找不到命令:$”

men*_*tol 3 macos ssh github iterm

我正在尝试使用我的 macOS 系统配置 github。我使用 iTerm 和 zsh。当我尝试根据https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it 中的说明生成新的 ssh 密钥时-to-the-ssh-agent#generating-a-new-ssh-key我收到一个错误“zsh:找不到命令:$”。请帮忙。

小智 8

$是你在sh中看到的。在 zsh 中,您可能会看到[path@user] $或类似的东西。你只是不能复制这个美元符号。您复制的内容仅应:

ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
Run Code Online (Sandbox Code Playgroud)