Initialize your first origin repository
Build Your First Origin Repository
Initialize your first origin repository
Turn your local project folder into a Divekit origin repository.
Create the origin repository
Step 1: prepare a GitLab group
Before you run divekit init, create or choose a GitLab group that may contain the generated repositories.
You will need its numeric groupId during the interactive setup.
Step 2: initialize Divekit
Run:
# Initialize a new Divekit origin repository
divekit init
Follow the interactive prompts. For this course:
- use the distribution name
M0 - enter the real
groupIdof your GitLab group - keep the default member permission shown in the prompt
- choose
Nofor the evaluation pipeline
A typical flow in this course looks like this:
$ divekit init
Welcome to Divekit CLI!
This utility will walk you through creating or updating the
necessary configuration files for your 'Origin' Divekit repository.
It only covers the most common items, and tries to
guess sensible defaults or use existing values.
Press ^C at any time to quit.
Distribution Name
A distribution groups one rollout of repositories, for example for one milestone of a project or one exam.
> M0
Main Group ID
The GitLab group used as the base location for this distribution.
> 311
Set Member Permissions
Default GitLab permissions for the students in their repositories.
● reporter
○ none
○ guest
○ developer
○ maintainer
↑/↓ to navigate • enter to select • esc to cancel
Enable Evaluation Pipeline?
Creates an additional repository for each work repository to run evaluation pipelines separately.
○ Yes
● No
↑/↓ to navigate • enter to select • esc to cancel
Configuration created successfully!
Configuration stored at .divekit/distributions/M0/config.json
If you have configured more than one GitLab host, an additional Select Remote Host prompt appears between these steps.
With only the gitnrw host from this course, Divekit selects it automatically.
After divekit init, your project now contains the generated distribution config at:
.divekit/distributions/M0/config.json
This is the point where your plain project folder becomes a Divekit origin repository.
Common failures
At this stage, the important thing is simple:
config.jsonexists- the distribution folder exists
- your project is now a Divekit origin repository
Check
After running divekit init, answer:
.divekit/distributions/M0/config.json — the distribution name M0 is part of the path.
311.
divekit init. The generated distribution config under .divekit/ is what makes the folder an origin repository.