Accessing 2 different private git repos with a single SSH key during a CI / CD workflow in bitrise

319 Views Asked by At

I have 2 repos which I am using in my CI / CD pipeline using bitrise. For setting up bitrise with one git repo is quite simple and straight forward which builds my 1st repo fine post which I need to push the .xcframework file created from step1 into a different private repo, while doing so I get below error which is because my git is not authenticated to use different repo at this point.

Error :

ERROR: The key you are authenticating with has been marked as read only.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Any solutions or approaches, Please help.

T

1

There are 1 best solutions below

0
Łukasz Łabuński On BEST ANSWER

You can try to use the same approach as it is in case of submodules. Then you are not adding SSH key to the project as a deploy keys, but add it to your or machine github account as a SSH.