Mirroring a Repository
In DevOps, you can mirror a code repository from GitHub, GitLab, Bitbucket Cloud, or Visual Builder Studio. Mirroring allows you to mirror repositories to and from external sources. You can mirror branches and commits between repositories.
Before using an external repository in DevOps, you must create a connection to the repository. To integrate with GitHub, GitLab, and Visual Builder Studio, you have to create a personal access token (PAT) and store the PAT in an Oracle Cloud Infrastructure (OCI) vault. For more information, see Build Source Integration. To integrate with Bitbucket Cloud, you have to create a username and app password and store the password in an OCI vault. See Generating an App Password for Bitbucket Cloud.
An authentication (auth) token is required for each user who uses Git to interact with the code repositories in Oracle Cloud.
Each service in OCI integrates with Identity and Access Management (IAM) for authentication and authorization. For creating dynamic groups and policies for code repositories and external connections, see Code Repository Policies. For more details, see DevOps IAM Policies.
Before you mirror a repository, you must have a DevOps project.
For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.
See Viewing Code Repository Details. To synchronize the mirrored repository as needed or based on a defined time interval, see Synchronizing a Mirrored Repository. To clone your code repository, see Cloning a Repository.
To mirror a repository, run the
mirror
command:oci devops repository mirror --repository-id
To get all the commands for
repository
:oci devops repository -h
To get all the commands for
mirror
:oci devops repository mirror -h
To mirror a repository, use the
MirrorRepository
operation.