SMOLNET PORTAL home about changes

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 (https://github.blog)
with ssh-keygen (https://help.github.com)


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)
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 (https://web.archive.org)
Response: 20 (Success), text/gemini
Original URLgemini://chirale.org/2019-04-20_5506.gmi
Status Code20 (Success)
Content-Typetext/gemini; charset=utf-8