Can someone take a look at the following Lab which I have attempted a few times?
Not sure if I have missed something or going about this lab all wrong.
Many thanks.
- git bare repository ‘/opt/blog.git’ not found on Storage Server or its not a bare repository
[natasha@ststor01 ~]$ sudo yum install -y git
Last metadata expiration check: 0:02:40 ago on Fri Mar 20 17:52:37 2026.
Package git-2.52.0-1.el9.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[natasha@ststor01 ~]$ sudo git init --bare /opt/blog.git
hint: Using ‘master’ as the name for the initial branch. This default branch name
hint: will change to “main” in Git 3.0. To configure the initial branch name
hint: to use in all of your new repositories, which will suppress this warning,
hint: call:
hint:
hint: git config --global init.defaultBranch
hint:
hint: Names commonly chosen instead of ‘master’ are ‘main’, ‘trunk’ and
hint: ‘development’. The just-created branch can be renamed via this command:
hint:
hint: git branch -m
hint:
hint: Disable this message with “git config set advice.defaultBranchName false”
Initialized empty Git repository in /opt/blog.git/
[natasha@ststor01 ~]$ sudo chown -R natasha:natasha /opt/blog.git
[natasha@ststor01 ~]$ sudo chmod 755 /opt
[natasha@ststor01 ~]$ sudo chmod -R 775 /opt/demo.git
chmod: cannot access ‘/opt/demo.git’: No such file or directory
[natasha@ststor01 ~]$ sudo chmod -R 775 /opt/blog.git
[natasha@ststor01 ~]$ git --git-dir=/opt/blog.git rev-parse --is-bare-repository
true
[natasha@ststor01 ~]$ grep “bare = true” /opt/blog.git/config
bare = true
[natasha@ststor01 ~]$ sudo git int .
git: ‘int’ is not a git command. See ‘git --help’.
The most similar command is
init
[natasha@ststor01 ~]$ sudo git init .
hint: Using ‘master’ as the name for the initial branch. This default branch name
hint: will change to “main” in Git 3.0. To configure the initial branch name
hint: to use in all of your new repositories, which will suppress this warning,
hint: call:
hint:
hint: git config --global init.defaultBranch
hint:
hint: Names commonly chosen instead of ‘master’ are ‘main’, ‘trunk’ and
hint: ‘development’. The just-created branch can be renamed via this command:
hint:
hint: git branch -m
hint:
hint: Disable this message with “git config set advice.defaultBranchName false”
Initialized empty Git repository in /home/natasha/.git/
[natasha@ststor01 ~]$ sudo git init .
Reinitialized existing Git repository in /home/natasha/.git/
[natasha@ststor01 ~]$
[natasha@ststor01 ~]$
[natasha@ststor01 ~]$
[natasha@ststor01 ~]$ sudo chown -R natasha:natasha /opt/blog.git
[natasha@ststor01 ~]$ cd /opt
[natasha@ststor01 opt]$ ls
blog.git containerd
[natasha@ststor01 opt]$ cd blog.git
[natasha@ststor01 blog.git]$ ls -la
total 36
drwxrwxr-x 6 natasha natasha 4096 Mar 20 17:55 .
drwxr-xr-x 1 root root 4096 Mar 20 17:55 …
-rwxrwxr-x 1 natasha natasha 23 Mar 20 17:55 HEAD
-rwxrwxr-x 1 natasha natasha 66 Mar 20 17:55 config
-rwxrwxr-x 1 natasha natasha 73 Mar 20 17:55 description
drwxrwxr-x 2 natasha natasha 4096 Mar 20 17:55 hooks
drwxrwxr-x 2 natasha natasha 4096 Mar 20 17:55 info
drwxrwxr-x 4 natasha natasha 4096 Mar 20 17:55 objects
drwxrwxr-x 4 natasha natasha 4096 Mar 20 17:55 refs
[natasha@ststor01 blog.git]$
