Skip to content

Instantly share code, notes, and snippets.

@carlohcs
Created August 13, 2021 21:26
Show Gist options
  • Save carlohcs/cc4cd402038fa16b7162ab7581a95308 to your computer and use it in GitHub Desktop.
Save carlohcs/cc4cd402038fa16b7162ab7581a95308 to your computer and use it in GitHub Desktop.
How to use SSL on GitHub

How to use SSL on GitHub

Create a SSH file:

$ ssh-keygen -t ed25519 -C "your-email@server.com"

Move private and public key in the folder ~/.ssh

Create file:

$ touch ~/.ssh/config

Put:

Host {project name}
    Hostname github.com
    IdentityFile ~/.ssh/{ssl private key name}
    IdentitiesOnly yes

Example

Host myproject
    Hostname github.com
    IdentityFile ~/.ssh/MyProjectPrivateSSLKey
    IdentitiesOnly yes

Clone project:

$ git clone git@myproject:your-user/your-project-name.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment