Lab 001: Git Install and Create Repository
Requirements
The Nautilus development team shared with the DevOps team requirements for new application development, setting up a Git repository for that project. Create a Git repository on Storage server in Stratos DC as per details given below:
- Install git package using yum on Storage server.
- After that create/init a git repository /opt/beta.git (use the exact name as asked and make sure not to create a bare repository).
Prerequisites
- Access to the Storage server with sudo privileges
- Internet access to install packages
Steps
# 1. Login to the Storage server
ssh natasha@<storage-server-ip>
sudo su -
# 2. Install git
yum install -y git
rpm -qa | grep git # verify installation
# 3. Initialize the new git repository
cd /opt
git init beta.git
# 4. Verify repository
cd beta.git
git status
Verification
To verify the setup:
# Check that git is installed
git --version
# Check that the repository exists and is not bare
cd /opt/beta.git
git status
ls -la /opt/beta.git