Home > OS >  zsh terminal can't open config?
zsh terminal can't open config?

Time:12-28

Hello I am very new to using zsh terminal and am trying to set up my SSH key with github. According to enter image description here

CodePudding user response:

Adding your key to your ~/.ssh/config (using, as noted, a text editor) is only needed to:

  • reference a private SSH key which is not a default one (as listed in "Checking for existing SSH keys"), like id_rsa, id_ecdsa, or id_ed25519.
  • using a shorter SSH URL

Meaning your config file can look like:

Host gh
  Hostname github.com
  User git
  IdentityFile ~/.ssh/my_private_key
  IdentitiesOnly yes

And your SSH URL becomes gh:me/myRepository. (no more [email protected]:...) You can test your SSH key with ssh -Tv gh.

  • Related