Git, how to generate public key

前端 未结 3 1436
梦谈多话
梦谈多话 2020-12-13 01:15

how to generate a public key(to be used in GitHub/GitLab) using command line [Git Bash].

The command below generates the error sh.exe\": syntax error near une

3条回答
  •  再見小時候
    2020-12-13 01:59

    Solution: ssh-keygen -t rsa

    Explanation : ssh-keygen is a tool for creating new authentication key pairs for SSH. Such key pairs are used for automating logins, single sign-on, and for authenticating hosts

    (for example cloning project from your private repo on Github straight to your aws machine).

    Options: You can perform more complicated operations and using flags in order to generate a tailor-made key according to your use case, extended functionality are more powerful and secured. The basic flags are: bits (Large integers making the the RSA key be less vulnerable and hard to crack), passphrase (similar to password) , type (dsa/ecdsa/ed25519/rsa) , comment for the specific ssh token (email or user name) and output key (default store on ~/.ssh/ path)

    Synopsis: ssh-keygen [-q] [-b bits] [-t dsa | ecdsa | ed25519 | rsa] [-N new_passphrase] [-C comment] [-f output_keyfile]

    Example:

    ssh-keygen -b 4096 -t rsa -n "tHiSiaPasSWoRd" -c "johnDoe@gmail.com" -f ~/.ssh/id_rsa
    

提交回复
热议问题