• Contact
  • Contact Us
  • Disclamer
  • Home 1
  • Home 2
  • Home 3
  • Privacy Policy
Friday, May 9, 2025
How VPS - How to use/setup VPS
  • Login
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon
No Result
View All Result
How VPS - How to use/setup VPS
No Result
View All Result
Home Operating System Debian

Use Gitolite To Setup Git Repositories on Debian

How VPS by How VPS
November 1, 2019
in Debian
0
0
SHARES
24
VIEWS
Share on FacebookShare on Twitter

Contents

  1. Want to contribute?


This tutorial will show you how to easily and conveniently setup git repositories with Gitolite on Debian Wheezy. For the course of this tutorial, we will assume that you are working with administrative privileges. If you want to use sudo instead, append it where necessary.

First, login via SSH and make sure that your packages are up to date and that the dependencies are met:

apt-get update && apt-get upgrade && apt-get install git perl

Gitolite depends on a dedicated user for everything git-related, since it acts as a wrapper around it. You can name it whatever you want. We’ll go with git here:

useradd -m git
passwd git

Make sure that your own SSH public key has been copied on the server by issuing the following command from your client machine:

scp yourkey.pub [email protected]:˜/yourname.pub

This only works for Linux or BSD workstations. For Windows and OS X, please consult the documentation of your operating system. If you don’t have SSH keys right now, see this Vultr doc on how to generate them.

The next step is important. Ensure that your ˜/.ssh/authorized_keys file is empty.

Download and install Gitolite directly from Github since the version in Debian’s repository is outdated:

su git
cd
git clone git://github.com/sitaramc/gitolite
mkdir -p $HOME/bin
gitolite/install -to $HOME/bin

Make yourself an administrative user:

bin/gitolite setup -pk yourname.pub

The installation is complete. Next, you need to add users and repositories. Contrary to “normal” systems management, Gitolite relies on a special repository for user and repository management, it’s called gitolite-admin.

Clone gitolite-admin on your client:

git clone [email protected]:gitolite-admin

If you cd into gitolite-admin, you should now see two directories:

  • conf
  • keydir

The directory keydir stores the public keys of users, therefore if you wanted to add a user called user1, you would place their public key in the keydir and name it user1.pub.

Adding new repositories is done in the file conf/gitolite.conf. To give user1 read and write access to the repository Testing (which is already there by default) you would have to change it to the following:

repo testing
  5     RW+     =   user1

To make those changes take effect, you have to push the changes to the repository:

git add conf
git add keydir
git commit -m "user1 - testing"
git push

That’s about everything – repeat the process for every new user / repository. Happy coding!

Want to contribute?

You could earn up to $300 by adding new articles

Submit your article
Suggest an update
Request an article
Previous Post

How to Enable TLS 1.3 in Apache on Debian 10

Next Post

Installing Debian 8 on Vultr

Next Post

Installing Debian 8 on Vultr

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

No Result
View All Result

Recent Post

Install Imagemagick on CentOS
CentOS

Install Imagemagick on CentOS

by How VPS
June 28, 2023
0

This is how I installed Imagemagick on a vanilla CentOS server Start off by installing the prerequisites yum install php-pear...

Read more
how to Check phpinfo

How to Check phpinfo of Hosting or VPS?

June 28, 2023
Failed to download metadata for repo 'appstream' on Centos 8

How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

February 25, 2022
How to Fix MySQL Error "Plugin 'InnoDB' registration as a STORAGE ENGINE failed"?

How to Fix MySQL Error “Plugin ‘InnoDB’ registration as a STORAGE ENGINE failed”?

November 17, 2020
How to optimize Mysql or MariaDB

How to optimize Mysql or MariaDB

November 3, 2020

Recent News

  • Install Imagemagick on CentOS
  • How to Check phpinfo of Hosting or VPS?
  • How to fix error: Failed to download metadata for repo ‘appstream’ on Centos 8

Category

  • Arch
  • Authentication
  • Backups
  • BSD
  • Centmin Mod
  • CentOS
  • Control Panels
  • CoreOS
  • CWP
  • Debian
  • Directadmin
  • Encryption
  • Fedora
  • Firewalls
  • Hocvps Script
  • Hosting providers
  • Kloxo-MR
  • Linux
  • Mitigations
  • Operating System
  • Plesk
  • Reviews
  • Securing VPS/Servers
  • Security Patches
  • SSL Certificates
  • Uncategorized
  • Upgrading
  • VPS/Servers management guides
  • Vulnerability Detection
  • Web servers software
  • Webhosting Control Panel
  • About
  • Advertise
  • Careers
  • Contact

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

No Result
View All Result
  • Home
  • Management guides
    • Web servers software
      • Directadmin
      • Hocvps Script
      • Centmin Mod
      • CWP
      • Kloxo-MR
      • Plesk
    • Control Panels
    • Securing VPS/Servers
      • SSL Certificates
      • Upgrading
      • Authentication
  • Operating System
    • CentOS
    • Fedora
    • Debian
    • Linux
    • Arch
    • BSD
    • CoreOS
  • Reviews
  • Coupon
    • Domain Coupon
    • Hosting Coupon

© 2025 JNews - Premium WordPress news & magazine theme by Jegtheme.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In
Thabet