# Multiple deploy keys for GitHub

**URL:** <https://discuss.circleci.com/t/multiple-deploy-keys-for-github/25658>\
**Category:** Integrations and Accounts\
**Tags:** ssh\
**Created:** [October 9, 2018, 11:27am UTC](https://discuss.circleci.com/t/multiple-deploy-keys-for-github/25658 "2018-10-09T11:27:42Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![JanBrinker](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/janbrinker/32/16761_2.png) [@JanBrinker](https://discuss.circleci.com/u/JanBrinker)\
**Post date:** [October 22, 2018, 7:00am UTC](https://discuss.circleci.com/t/multiple-deploy-keys-for-github/25658/8 "2018-10-22T07:00:01Z")

</div>

I had some time to test a few things. I wasn’t able to get things up and running via host aliases _yet_, but I found another embarassingly simple solution that is less versatile but works fine at least if you have only one more repo that you need to access:

1. Generate the SSH deploy key for GitHub and add it there. (Make sure it’s without password)

2. Add it to CircleCI settings via the web interface under the section “SSH Keys” and set the host to “[github.com](http://github.com)” (or wherever your repo lies)  
When defining your job in the `config.yml` do this, in the _exact_ order:

So basically after the first checkout you tell CircleCI to use a different SSH key for GitHub for the next requests. This works well for accessing one more repo. However things will get really messy when you try to use the same method for accessing a third, fourth… repo. For that you will still need to use aliases. When I have the time I will try to find a solution for that aswell. But in the meanwhile, this works nice.

This might be especially interesting for other iOS projects like us that are using `fastlane match`. 🙂

---

_[View the full topic](https://discuss.circleci.com/t/multiple-deploy-keys-for-github/25658)._
