I am using the corporate version of GITHUB. I am creating an automatic build server to create our projects. These projects have submodules.
Since this build server is not an “I” (it cannot possess my credentials), it should be able to download projects from GIT using the “deploy keys” function of github. (read only ssh keys only)
Limitations: 1. github expects me to log in as ssh: // git @ mygithubserver.com 2. github applies a policy in which neither of the two projects can share the deployment key (unlike regular user keys, which registered for the whole github server). [side question, what is the reason for this ?!] 3. My corporate IT does not allow the use of common arbitrary accounts: the user is always connected to the person, he cannot belong to the server.
As such, I think that my only option is to use the key deployment function with different keys for different projects. (deploy keys were mainly designed with this scenario in mind ...)
The only way to find multiple keys: https://gist.github.com/jexchan/2351996
Now for the submodules: this trick can only work for top-level projects, because this is the only place where I can specify my own host name, for example: git clone git @ custom-git -host-name ".
When it goes to init and updates the submodules , it uses any hostname in the parent repo (which is the original mygithubserver.com). When our developers use their private keys, it works flawlessly. However, for a build server that needs different deployment keys for different projects, this fails.
Is there a way around this and GIT to use different ssh keys for different projects on the same server?
Is there some stupid way to split keys into two projects? (I am not allowed to modify the github source code, as this is really a huge githib server for IT management)