Git創建ssh密匙時報錯Too many arguments解決方法


原文鏈接:https://blog.csdn.net/qq_31165799/article/details/72832269

如題:git創建密匙時報錯Too many arguments。

運行命令ssh-keygen -t rsa -C “123456789@qq.com”時報錯:
    Too many arguments.
    usage: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa | rsa1]
                      [-N new_passphrase] [-C comment] [-f output_keyfile]
           ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]
           ssh-keygen -i [-m key_format] [-f input_keyfile]
           ssh-keygen -e [-m key_format] [-f input_keyfile]
           ssh-keygen -y [-f input_keyfile]
           ssh-keygen -c [-P passphrase] [-C comment] [-f keyfile]
           ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile]
           ssh-keygen -B [-f input_keyfile]
           ssh-keygen -D pkcs11
           ssh-keygen -F hostname [-f known_hosts_file] [-l]
           ssh-keygen -H [-f known_hosts_file]
           ssh-keygen -R hostname [-f known_hosts_file]
           ssh-keygen -r hostname [-f input_keyfile] [-g]
           ssh-keygen -G output_file [-v] [-b bits] [-M memory] [-S start_point]
           ssh-keygen -T output_file -f input_file [-v] [-a rounds] [-J num_lines]
                      [-j start_line] [-K checkpt] [-W generator]
           ssh-keygen -s ca_key -I certificate_identity [-h] [-n principals]
                      [-O option] [-V validity_interval] [-z serial_number] file ...
           ssh-keygen -L [-f input_keyfile]
           ssh-keygen -A
           ssh-keygen -k -f krl_file [-u] [-s ca_public] [-z version_number]
                      file ...
           ssh-keygen -Q -f krl_file file ...

問題處處:

Wrong dash symbol "–" in arguments; options are started with "-" (minus sign, ASCII code 0x2D). Here follows the same command with correct characters:

    $ ssh-keygen -t rsa -C "myEmail@gmail.com"
    Generating public/private rsa key pair.

很明顯,是因為“-”的問題,弄了一天也是醉了,還好問題解決了。希望能給大家帶來幫助!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM