Using Copybara with deploy keys?
- Dominant language
- Java
- Stars
- 3.8k
- Forks
- 345
- PR merge metrics
- No merged PRs in 30d
Description
We would like to give Copybara access to the origin repo using a read only deploy key and the destination repo using a read/write deploy key. GitHub does not allow the same SSH key to be used as a deploy key in two different repos.
It's not clear to me how to do this with Copybara. A common trick when using git to access different repos with different keys is explained here: https://gist.github.com/gubatron/d96594d982c5043be6d4 - however this appears not to work with Copybara as there is a check for the GitHub hostname in the code [1].
Is there a way to use different keys to access different repos with Copybara? If not, please could it be added e.g. by allowing the `GIT_SSH_COMMAND` environment variable to be specified on a per-repo basis?
Thanks.
Christopher Hoskin
[1] https://github.com/google/copybara/blob/574ddc0ed1b50d3240509e71ae7d563554fb635d/java/com/google/copybara/git/GitModule.java#L1398
Contributor guide
Assessment
This issue has not been assessed yet.