Creating an External Connection
Create a connection to external repositories such as GitHub, GitLab, Bitbucket Cloud, Visual Builder Studio, Bitbucket Server, and GitLab Server.
Before creating the connection, you must do the following depending on the repository you want to connect to:
- GitHub Enterprise Cloud, GitLab SaaS, GitLab Server, and Visual Builder Studio: You have to retrieve a personal access token (PAT) from those providers and store your PAT securely in an OCI vault. For instructions, see Build Source Integration.
- Bitbucket Cloud: You need your Bitbucket username and create an app password, then store the app password in an OCI vault. See Generating an App Password for Bitbucket Cloud.
- Bitbucket Server: Create HTTP access token and then store the access token in an OCI vault.
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.
For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.
You can now mirror a code repository from GitHub, GitLab, Bitbucket Cloud, or Visual Builder Studio. See Mirroring a Repository. To create a GitHub connection, run the
create-github-connection
command:oci devops connection create-github-connection --personal-access-token, --project-id
To create a GitLab connection, run the
create-gitlab-connection
command:oci devops connection create-gitlab-connection --personal-access-token, --project-id
To create a Bitbucket Cloud connection, run the
create-bitbucket-cloud-connection
command:oci devops connection create-bitbucket-cloud-connection --bitbucket-cloud-username, --app-password, --project-id
To create a Visual Builder Studio connection, run the
create-vbs-connection
command:oci devops connection create-vbs-connection --access-token, --base-url, --project-id
To create a Bitbucket Server connection, run the
create-bitbucket-server-connection
command:oci devops connection create-bitbucket-server-connection --personal-access-token, --base-url, --project-id
To create a GitLab Server connection, run the
create-gitlab-server-connection
command:oci devops connection create-gitlab-server-connection --personal-access-token, --base-url, --project-id
To view list of connections, run the
list
command:oci devops connection list
To get all the commands for
connection
:oci devops connection -h
To create an external connection, use the
CreateConnection
operation.