Creating a Repository
Learn how to create a code repository in the DevOps service.
Required IAM Policy
Each service in Oracle Cloud Infrastructure (OCI) integrates with Identity and Access Management (IAM) for authentication and authorization. To grant users permission to access the DevOps code repositories and other resources, you have to create dynamic groups and IAM policies.
For creating dynamic groups and policies for code repositories, see Code Repository Policies. For more details, see DevOps IAM Policies.
An authentication (auth) token is required for each user who uses Git to interact with the code repositories in Oracle Cloud.
For accessing DevOps using the Oracle Cloud Console, REST API, and CLI, see Accessing DevOps.
Using the Console
- Open the navigation menu and click Developer Services. Under DevOps, click Projects.
- Select a project and click Code Repositories on the left-side menu.
- Select a code repository.
- You can perform the following actions on the repository, as needed. These
options are available in the left-side menu of the repository details page:
- To view and access all the files and folders in your repository, click Files. Last commit and update details are also available.
- To view and access all the commits pertaining to the code repository, click Commit. Details such as commit date and author are provided. You can filter the commits by author and date. Each commit is assigned a unique ID, which you can use to track the changes.
- To compare file changes and commit changes between any two branches in your repository, click Compare. Choose a source and target branch to compare.
- To view and access all the available branches in your repository, click Branches.
- To view the various tags that point to specific points in the commits, click Git Tags.
- To monitor the status of all the operations in progress, click Work Requests.
To clone your code repository, see Cloning a Repository.
Using the CLI
To create a code repository, run the create
command:
oci devops repository create --name --project-id --repository-type
To view a list of repositories, run the list
command:
oci devops repository list --compartment-id or --project-id
To view a list of commits, run the list-commits
command:
oci devops repository list-commits --repository-id
To get all the commands for repository
:
oci devops repository -h
Using the API
To create a code repository, use the CreateRepository
operation.
To view a list of commits to the repository, use the ListCommits
operation.
To view a list of repositories, use the ListRepositories
operation.