It’s finally time to connect a desktop to the repository. Issue the command:Ĭhange the ownership of the new repository with the command:Ĭhange the permissions of the repository with the command:
#The git up update
Next, we want to update the Git server, so it’s aware of the changes. Now we’ll initialize the repository with the command: Now create the repository with the command:Ĭhange into this new directory with the command: To create the new repository, change into the git directory with the command: Remember, however, to create a repository using the same name as you did when you created the new user account. Since we just created the user, jack, we’ll stick with that. It’s time to create your first repository. Sudo systemctl restart nginx Create Your First Repository Once that’s complete, restart NGINX with the command: You’ll be prompted to type and verify a new password for the user. Sudo htpasswd -c /var/www/html/git/htpasswd jack To create the new user, issue the command: I’ll demonstrate by creating the user “jack.” You’ll want to make sure to create a user specific to your needs. We’ll do this by way of the htpasswd command. We now need to create a user that will have access to the HTTP Git Server. If you do see errors, go back into the configuration file and make sure the above code was pasted in the proper section. Nginx: the configuration file /etc/nginx/nf syntax is oknginx: configuration file /etc/nginx/nf test is successful You should see the following reported back: Run the NGINX configuration test with the command: Sudo nano /etc/nginx/sites-available/default To do this, open the default NGINX site configuration file with the command: NGINX must now be configured, such that it knows to serve up the repositories on the server. Sudo chown -R www-data:www-data /var/www/html/git Configure NGINX
Give that directory the proper ownership with the command:
With everything installed, create a directory to house our Git repositories with the command: Create a Git Directory to House Repositories
That’s all there is to the installation of software on your server.
#The git up install
Sudo apt-get install nginx git nano fcgiwrap apache2-utils -y You can install everything necessary for HTTP Git Server with a single command. When this completes, reboot the server (if necessary).
#The git up upgrade
Once apt is updated, upgrade the server with the command: Log into your Ubuntu server and update apt with the command: Because of this, make sure to run the update/upgrade at a time when a reboot is possible. Remember, however, if the kernel is upgraded in the process, you’ll need to reboot the server. The first thing you’ll want to do is update and upgrade your instance of Ubuntu server. A running instance of Ubuntu Server 18.04.In order to successfully get HTTP Git Server up and running, you’ll need the following: Once complete, you’ll have a repository that anyone on your LAN can use. I’m going to walk you through the process of installing and configuring HTTP Git Server on Ubuntu 18.04. HTTP Git Server is surprisingly easy to setup and manage. This open source project uses NGINX to serve up Git repositories over your Local Area Network (LAN). Those projects might be proprietary or only intended for internal usage. Some of your projects, however, might be small or private enough that you don’t want them hosted on public repositories.
Those projects are probably hosted on GitHub, or some other large-scale versioning system. You work on many projects, some of which are collaborated on across the world.