Налаштування репозиторію GitLab у Windows 11

watch 2m, 25s
views 2

09:10, 29.05.2026

Зміст статті
arrow

  • Prerequisites
  • Step 1: Configure Git
  • Step 2: Create a New Repository on GitLab
  • Step 3: Set Up SSH Keys (Recommended)
  • Step 4: Clone the Repository to Your PC
  • Step 5: Add Files and Make Your First Commit
  • Step 6: Sync Changes and Collaborate
  • Final Thoughts

Whether you’re a developer working on personal projects or collaborating with a team, version control is essential. GitLab, a web-based DevOps platform, offers a robust Git repository manager with CI/CD pipelines, issue tracking, and more.

This guide walks you through setting up a GitLab repository on a Windows 11 machine from scratch.

Prerequisites

Before getting started, ensure the following are installed.

  • Git for Windows. Download Git and follow the installation instructions. During installation, select the default options unless you have specific preferences.
  • GitLab Account. Sign up at gitlab.com if you haven’t already.
  • Optional: Git Bash or Windows Terminal. While Git Bash is bundled with Git for Windows, you can also use Windows Terminal or PowerShell.

Step 1: Configure Git

Once Git is installed, open Git Bash or PowerShell and configure your username and email:

git config --global user.name "Your Name" 
git config --global user.email "your.email@example.com"

This information will be linked to your commits.

Step 2: Create a New Repository on GitLab

  1. Log in to your GitLab account.
  2. Click the "New Project" button.
  3. Choose "Create blank project".
  4. Fill in the Project name, visibility level (private, internal, public), and other settings.
  5. Click Create project.

Once the project is created, GitLab will show you the repository URL (HTTPS or SSH).

Step 3: Set Up SSH Keys (Recommended)

Using SSH provides a secure and passwordless connection.

  • Generate a new SSH key:
ssh-keygen -t ed25519 -C "your.email@example.com"

Press Enter through the prompts. Your key will be saved in C:\Users\<YourUser>\.ssh\.

  • Copy the public key:
cat ~/.ssh/id_ed25519.pub

Copy the output.

  • In GitLab:
  1. Go to User Settings > SSH Keys.
  2. Paste the key, give it a title, and click Add Key.

Step 4: Clone the Repository to Your PC

Navigate to the folder where you want to store your local copy and run:

git clone git@gitlab.com:username/repository-name.git

Or use HTTPS (you’ll be prompted for username/password unless you configure a personal access token):

git clone https://gitlab.com/username/repository-name.git

Step 5: Add Files and Make Your First Commit

Navigate into the cloned repo:

cd repository-name

Create or add files, then track and commit them:

echo "# My GitLab Project" > README.md 
git add README.md 
git commit -m "Initial commit"

Push the changes: git push origin main

Step 6: Sync Changes and Collaborate

To pull new changes from GitLab:

git pull origin main

To push your local changes:

git push origin main

You can now collaborate, manage branches, and integrate CI/CD pipelines using GitLab’s interface.

Final Thoughts

Setting up a GitLab repository on Windows 11 is straightforward and a vital step in modern development workflows. With Git and GitLab configured, you're ready to version control your code, track issues, and automate deployment processes.

If you plan to work with teams or manage multiple environments, explore GitLab’s advanced features like merge requests, pipelines, and project access controls.

Поділитися

Чи була ця стаття корисною для вас?

Популярні пропозиції VPS

-10%

CPU
CPU
3 Epyc Cores
RAM
RAM
2 GB
Space
Space
25 GB NVMe
Bandwidth
Bandwidth
Unlimited
wKVM-NVMe 2048 Windows

9.9

При оплаті за рік

-9.5%

CPU
CPU
4 Xeon Cores
RAM
RAM
8 GB
Space
Space
100 GB SSD
Bandwidth
Bandwidth
Unlimited
10Ge-wKVM-SSD 8192 Windows

121.5

При оплаті за рік

-9.6%

CPU
CPU
8 Xeon Cores
RAM
RAM
32 GB
Space
Space
200 GB SSD
Bandwidth
Bandwidth
12 TB
wKVM-SSD 32768 Metered Windows

156

При оплаті за рік

-10%

CPU
CPU
4 Epyc Cores
RAM
RAM
4 GB
Space
Space
50 GB NVMe
Bandwidth
Bandwidth
Unlimited
Keitaro KVM 4096
OS
CentOS
Software
Software
Keitaro

18.1

При оплаті за рік

-10%

CPU
CPU
4 Epyc Cores
RAM
RAM
4 GB
Space
Space
50 GB NVMe
Bandwidth
Bandwidth
Unlimited
KVM-NVMe 4096 Linux

16.45

При оплаті за рік

-10%

CPU
CPU
6 Xeon Cores
RAM
RAM
16 GB
Space
Space
150 GB SSD
Bandwidth
Bandwidth
Unlimited
10Ge-KVM-SSD 16384 Linux

231

При оплаті за рік

-10%

CPU
CPU
4 Xeon Cores
RAM
RAM
8 GB
Space
Space
100 GB SSD
Bandwidth
Bandwidth
Unlimited
10Ge-KVM-SSD 8192 Linux

115.5

При оплаті за рік

-10%

CPU
CPU
4 Xeon Cores
RAM
RAM
4 GB
Space
Space
100 GB HDD
Bandwidth
Bandwidth
Unlimited
KVM-HDD 4096 Linux

15

При оплаті за рік

-20.8%

CPU
CPU
6 Xeon Cores
RAM
RAM
16 GB
Space
Space
150 GB SSD
Bandwidth
Bandwidth
10 TB
wKVM-SSD 16384 Metered Windows

100

При оплаті за рік

-10%

CPU
CPU
4 Epyc Cores
RAM
RAM
4 GB
Space
Space
50 GB NVMe
Bandwidth
Bandwidth
Unlimited
wKVM-NVMe 4096 Windows

18.1

При оплаті за рік

Інші статті на цю тему

cookie

Чи приймаєте ви файли cookie та політику конфіденційності?

Ми використовуємо файли cookie, щоб забезпечити вам найкращий досвід роботи на нашому сайті. Якщо ви продовжуєте користуватися сайтом, не змінюючи налаштувань, вважайте, що ви згодні на отримання всіх файлів cookie на сайті HostZealot.