How to get authentication key on ubuntu ?

we need to add different repository on software sourcelist .we need to add a authentication keys for the repositories.for that we need to add this below script on /bin/ folder.

#! /bin/sh
if [ "`whoami`" != "root" ];
echo "Please run with SUDO"
exit 1
RELEASE=`cat /etc/lsb-release | grep DISTRIB_CODENAME | cut -d"=" -f2`
echo Release: $RELEASE
echo Please Wait...
for q in `find /etc/apt/ -name *.list`; do
cat $q >> fullsourceslist
for i in `cat fullsourceslist | grep "deb http" | grep ppa.launchpad | grep $RELEASE | cut -d/ -f4`; do
wget -q --no-check-certificate `wget -q --no-check-certificate$i/+archive -O- | grep "" | cut -d'"' -f2 ` -O- | grep "pub " | cut -d'"' -f2 >> keyss
for j in `cat keyss` ; do
wget -q --no-check-certificate "$j" -O- | grep -B 999999 END |grep -A 999999 BEGIN > keyss2
sudo apt-key add keyss2
rm keyss2
rm keyss
rm fullsourceslist

rename as launchpad-update

sudo chmod +x launchpad-update
sudo ./launchpad-update

Wallaaaaaaaaaa!!!!!!!!!!!!!!! you are done …

Leave a Reply

Your email address will not be published. Required fields are marked *

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