💾 Archived View for chirale.org › 2019-04-20_5506.gmi captured on 2024-12-17 at 10:16:59. Gemini links have been rewritten to link to archived content

View Raw

More Information

⬅️ Previous capture (2024-05-12)

-=-=-=-=-=-=-

Using multiple deploy keys on github using .ssh/config

You can use multiple deploy keys for Github created with ssh-keygen following with these steps.

deploy keys for Github

with ssh-keygen

You have to add to your \~/.ssh/config

 Host github_deploy_key_1 Hostname github.com User git IdentityFile ~/.ssh/github_deploy_key_1_rsa Host github_deploy_key_2 Hostname github.com User git IdentityFile ~/.ssh/github_deploy_key_2_rsa 

If you haven’t added your github name on git:

 git config --global user.name "yourgithubname" git config --global user.email "youremail@example.com" 

Then clone your repository specifying your custom host, adapting what github suggest to you on repo page:

 git clone git@github_deploy_key_1:yourgithubname/your-repo.git 

If you have enabled push permissions you can use this deploy key even to update the repository.

In this way you can keep a server clean from your github passepartout and add only the keys it needs.

https://web.archive.org/web/20190420000000*/https://github.blog/2015-06-16-read-only-deploy-keys/

https://web.archive.org/web/20190420000000*/https://help.github.com/en/enterprise/2.16/user/articles/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent