Need help with "Update Git Repository with Sample HTML File" task – I think I did it correctly but task failed

I just completed the “Update Git Repository with Sample HTML File” task on KodeKloud Engineer, but it shows as failed. I believe I followed the steps correctly, but I might have missed something.


Hi @Malaka

No need to setup git config for this task.

IF you follow the task description, it should be done.

SCP the /tmp/index.html from Jump Host to /tmp in Storage Server. Navigate to the Git repo at /usr/src/kodekloudrepos/<git-repo> copy the /tmp/index.html to the directory, add the file to staging area, commit it, and finally push.

Hi @Malaka,

To complete the task successfully, I followed these steps on the Storage Server:

  1. Copied the sample file from the jump host to the Storage Server:
    scp /tmp/index.html natasha@ststor01:/tmp/index.html
  2. Logged in to the Storage Server:
    ssh natasha@ststor01
  3. switch to root: sudo -i
  4. Switched to the cloned repository:
    cd /usr/src/kodekloudrepos/official
  5. Moved the sample file into the repo:
    cp /tmp/index.html .
  6. git add index.html
  7. git commit -m “Add index.html”
  8. git remote -v
  9. git push origin master
  10. Verified that the commit landed in the bare repo:
    git --git-dir=/opt/official.git log --oneline

Please check. Thanks.

These should pass the test.

Did you verify if the /tmp/index.html exists in Storage Server after the copying step-1?