Monday, August 26, 2024

More than one ssh key for the github

 * Generate new key:

[18:05:20 harsshal@dell:~/projects]$ ssh-keygen -t ed25519 -C "harsshal@gmail.com"

* Add new key in the ssh config

[18:07:35 harsshal@dell:~/projects]$ cat ~/.ssh/config 
TCPKeepAlive yes

Host 10.234.1.112
  HostName 10.234.1.112
  User harshal

# Default GitHub
Host github.com
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_rsa

Host github-public
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519.pub

Host github-personal
  HostName github.com
  User git
  IdentityFile ~/.ssh/id_ed25519

* Clone the repo

[18:09:02 harsshal@dell:~/projects]$ git clone git@github-personal:harsshal/icarus_gl.git