Friday, August 26, 2016

setting up a GIT repo

# on the git server
yum install git
groupadd git
useradd user1 -G git
useradd user2 -G git
mkdir /opt/git/repo1.git
chgrp -R git /opt/git/repo1.git
chmod -R 2775 /opt/git/repo1.git
cd /opt/git/repo1.git
git init --bare

# on the workstation (when creating an entirely new repo only)
yum install git
mkdir ~/repo1
cd ~/repo1
git init
git remote add origin ssh://user1@10.137.7.175/opt/git/repo1.git
git branch --set-upstream-to=origin/master master
touch abc.txt
git add .
git commit -m "first commit"
git push

# on the subsequent workstation (that works on the same repo)
cd ~
git clone ssh://user2@10.137.7.175/opt/git/repo1.git
git pull
touch cde.txt
git add .
git commit -m "my commit'
git push

reading dpkg -l output; what is ii what is rc ?



First letter -> desired package state ("selection state"):
  • u ... unknown
  • i ... install
  • r ... remove/deinstall
  • p ... purge (remove including config files)
  • h ... hold
Second letter -> current package state:
  • n ... not-installed
  • i ... installed
  • c ... config-files (only the config files are installed)
  • u ... unpacked
  • f ... half-configured (configuration failed for some reason)
  • h ... half-installed (installation failed for some reason)
  • w ... triggers-awaited (package is waiting for a trigger from another package)
  • t ... triggers-pending (package has been triggered)
Third letter -> error state (you normally shouldn't see a thrid letter):
  • r ... reinst-required (package broken, reinstallation required)

When to use old-release.ubuntu.com and when to use archive.ubuntu.com

If you are running a old version of Ubuntu, probably you will need to amend your /etc/apt/sources.list file to have "old-release" as the URL. As those older versions of packages may have been moved over to here.

deb http://old-releases.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ lucid main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb-src http://old-releases.ubuntu.com/ubuntu/ lucid-updates main restricted universe multiverse
deb http://old-releases.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse 

deb-src http://old-releases.ubuntu.com/ubuntu/ lucid-security main restricted universe multiverse

If you are running the later version of Ubuntu, probably you will be getting as below, which is correct.

root@ubuntu:/home/anthony# egrep -v '^#|^$' /etc/apt/sources.list
deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb http://us.archive.ubuntu.com/ubuntu/ xenial universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb http://us.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe

deb http://security.ubuntu.com/ubuntu xenial-security multiverse
There was an error in this gadget