Git and Linux SSH script - liabilityissue/System-Admin-Network-Services-II GitHub Wiki

Installing GIT on Docker

  • sudo apt-get update
  • sudo apt-get install git

Install GIT Bash

  • git-scm.com/downloads (64 bit for windows setup)
  • When doing the git push command on windows make sure you press sign in with a code

Problems

  • git push is asking for a username and password to push then not pushing. When I try the public key way it's saying that I dont have permissions (on management).
  • When attempting to download git onto web01 it said there was not enough mirrors.

Solutions

  • Make sure DNS and the Gateway are on the correct IP addresses
  • git remote set-url origin
  • Delete and reclone

Useful Commands

  • sudo rm -r /home/name/nameofdirectory (used to delete clone)
  • git clone
  • git add .
  • git status
  • git commit -m "new commits"
  • git push
  • echo hostname >> [filename]
  • git pull
  • mkdir [name of directory]
  • cd [name of directory]
  • pwd