Configuring the access to GitHub with SSH

ssh-keygen -t ed25519 -C "winappdev@gmail.com"
# /home/dmitriano/.ssh/id_rsa_github
# and empty passphrase
nano .ssh/config
Host github.com
 HostName github.com
 IdentityFile ~/.ssh/id_rsa_github
stat -c %a ~/.ssh/config
chmod 600 ~/.ssh/config

Go to https://github.com/settings/keys and import the public key:

Clone a repository:

git clone git@github.com:dmitriano/bbs.git

2 Responses to Configuring the access to GitHub with SSH

  1. superadmin says:

    Create SSH user with limited privileges to only use Git repository

    https://serverfault.com/questions/170048/create-ssh-user-with-limited-privileges-to-only-use-git-repository

    You might consider using gitolite under a single user instead of setting up multiple git-shell users (and the required group and group permissions so they can share access to the repositories).

    gitolite runs under a single, normal user on the server and uses SSH public keys to differentiate access to Git repositories (see “how gitolite uses ssh” for some of the details of how gitolite does its SSH-based identification). gitolite offers per-repository, per-branch, and even some per-path access control.

Leave a Reply

Your email address will not be published. Required fields are marked *