DevOps Classroom notes 19/Nov/2023

Git Contd

Git Remote Repository

  • Fourth area of git
  • A git local repository can connect to multiple remote repositories
  • Each remote repository will have a name, by default when we perform clone operation, the name of remote is origin
  • Clone gets a copy of remote into local repository
  • in your local repo we will a branch called as main where we can work and in addition to this a branch will be created called as origin/main which represents the remote repo
  • Condition: When we are sending commits to remote repo. The latest commit id on origin/main and actual remote should be same
  • PUll = Fetch + Merge
  • To get remote changes without adding extra commits prefer git pull --rebase
  • upstream: Default remote repository
  • GitHub Repo:

    • SSH Configuration: Settings => Ssh keys => Add a new ssh key
  • We have understood how to work on multiple remotes


  • Git clone vs pull
  • Git pull vs pull –rebase
  • Git bare repository
  • Git mirror
  • Forking in Github


  • Configure your github account to use ssh key of your laptop
  • Create a local git repo called as notes and push it to github private repo called as notes in your account.
  • Create a new repository in github called as hello-remote
    • Explain git pull vs git pull –rebase
    • push a new branch
  • Create a linux vm and install git and ensure you have done atleast 10 questions before next session Refer Here

Jenkins installation

  • Install jdk 17
sudo apt update
sudo apt install openjdk-17-jdk -y
sudo wget -O /usr/share/keyrings/jenkins-keyring.asc \
echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \ binary/ | sudo tee \
  /etc/apt/sources.list.d/jenkins.list > /dev/null
sudo apt-get update
sudo apt-get install jenkins -y
  • Jenkins runs on port 8080 by default
  • Once we install jenkins a user called as jenkins is created
  • Navigate to http://<public-ip>:8080
  • Enter the initialAdmin password
sudo cat /var/lib/jenkins/secrets/initialAdminPassword
  • Install selected plugins
  • Create a admin user

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

About continuous learner

devops & cloud enthusiastic learner