Reference :- http://www.jeramysingleton.com/installing-gitolite/ & http://www.jeramysingleton.com/installing-gitolite/
https://github.com/sitaramc/gitolite
Setting up a gitolite server in Ubuntu:-
Run Below cmd on Server:-
sudo apt-get install git
sudo adduser \
--system \
--shell /bin/bash \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/git \
git
sudo su git #su - git
cd ~
mkdir ~/bin
git clone git://github.com/sitaramc/gitolite
gitolite/install -ln ~/bin
ls ~/bin
Run below cmd on local machine :-
ssh-keygen or ssh-keygen -C "saurabh"
cp .ssh/id_rsa.pub saurabh.pub
scp saurabh.pub git@gitserver:/home/git
Server :-
export PATH=/home/git/bin:$PATH
gitolite setup -pk saurabh.pub
local System :-
git clone git@gitserver:gitolite-admin
#For Alias
less ~/.ssh/config
Host alias
Hostname gitserver
User git
IdentityFile ~/.ssh/saurabh
##########################
ssh git@gitserver help
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
git svn clone http://192.168.1.7/cbs_img --trunk=. --authors-file=users.txt -s cbs_img
cd cbs_img
#git init
git remote add origin git@gitserver:cbs_img.git
git push origin --all
git svn rebase
git svn dcommit
git pull origin master
git svn dcommit
# for change into svn
git commit -am 'Adding git-svn instructions to the README'
git svn dcommit
####
git update-ref refs/heads/master refs/remotes/git-svn
git config svn.authorsfile users.txt
git svn clone http://192.168.1.7/cbs_pwa --trunk=. --authors-file=users.txt -s cbs_pwa --username=saurabh
############# Integrating Jenkins with Gitolite ##################
Ref Url :- https://wiki.jenkins.io/display/JENKINS/Gitolite
cd /var/lib/jenkins
/var/lib/jenkins$ sudo -u jenkins ssh-keygen
sudo -u jenkins cat .ssh/id_rsa.pub
~/gitolite-admin$ vim keydir/jenkins.pub
12:04:37 (master) ~/gitolite-admin$ vim conf/gitolite.conf
@development_team = bob carol ted alice
repo gitolite-admin
RW+ = hesco
repo myproject
RW+ = hesco
RW = @development_team
R = jenkins
git add keydir/jenkins.pub conf/gitolite.conf
git commit keydir/jenkins.pub conf/gitolite.conf
git push origin
/var/lib/jenkins/workspace/myproject$ sudo -u jenkins git clone git@gitserver:myproject
/var/lib/jenkins/workspace$ sudo -u jenkins rmdir myproject
sudo apt install -f # for install dependency
/var/lib/jenkins/secrets/initialAdminPassword # jenkins admin pwd
rsync -avzh --cvs-exclude /var/lib/jenkins/workspace/newcommunity_dev/ community@192.168.20.140:/home/product/community/saurabh/.
sudo su jenkins
sshpass -p "Devtest12" rsync -avzh --cvs-exclude /var/lib/jenkins/workspace/newcommunity_dev/ community@192.168.20.140:/home/product/community/saurabh/.
**************************************Git-web****************
https://gist.github.com/peter279k/6ac3a8a8ef2e1f24a48679713af50969
###################################33
cd REPONAME
git init
git add .
git commit -m 'initial commit' -a
git remote add origin git@gitserver:.git
git push origin master:refs/heads/master
git push --set-upstream origin master
https://github.com/sitaramc/gitolite
Setting up a gitolite server in Ubuntu:-
Run Below cmd on Server:-
sudo apt-get install git
sudo adduser \
--system \
--shell /bin/bash \
--gecos 'git version control' \
--group \
--disabled-password \
--home /home/git \
git
sudo su git #su - git
cd ~
mkdir ~/bin
git clone git://github.com/sitaramc/gitolite
gitolite/install -ln ~/bin
ls ~/bin
Run below cmd on local machine :-
ssh-keygen or ssh-keygen -C "saurabh"
cp .ssh/id_rsa.pub saurabh.pub
scp saurabh.pub git@gitserver:/home/git
Server :-
export PATH=/home/git/bin:$PATH
gitolite setup -pk saurabh.pub
local System :-
git clone git@gitserver:gitolite-admin
#For Alias
less ~/.ssh/config
Host alias
Hostname gitserver
User git
IdentityFile ~/.ssh/saurabh
##########################
ssh git@gitserver help
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
git svn clone http://192.168.1.7/cbs_img --trunk=. --authors-file=users.txt -s cbs_img
cd cbs_img
#git init
git remote add origin git@gitserver:cbs_img.git
git push origin --all
git svn rebase
git svn dcommit
git pull origin master
git svn dcommit
# for change into svn
git commit -am 'Adding git-svn instructions to the README'
git svn dcommit
####
git update-ref refs/heads/master refs/remotes/git-svn
git config svn.authorsfile users.txt
git svn clone http://192.168.1.7/cbs_pwa --trunk=. --authors-file=users.txt -s cbs_pwa --username=saurabh
############# Integrating Jenkins with Gitolite ##################
Ref Url :- https://wiki.jenkins.io/display/JENKINS/Gitolite
cd /var/lib/jenkins
/var/lib/jenkins$ sudo -u jenkins ssh-keygen
sudo -u jenkins cat .ssh/id_rsa.pub
~/gitolite-admin$ vim keydir/jenkins.pub
12:04:37 (master) ~/gitolite-admin$ vim conf/gitolite.conf
@development_team = bob carol ted alice
repo gitolite-admin
RW+ = hesco
repo myproject
RW+ = hesco
RW = @development_team
R = jenkins
git add keydir/jenkins.pub conf/gitolite.conf
git commit keydir/jenkins.pub conf/gitolite.conf
git push origin
/var/lib/jenkins/workspace/myproject$ sudo -u jenkins git clone git@gitserver:myproject
/var/lib/jenkins/workspace$ sudo -u jenkins rmdir myproject
sudo apt install -f # for install dependency
/var/lib/jenkins/secrets/initialAdminPassword # jenkins admin pwd
rsync -avzh --cvs-exclude /var/lib/jenkins/workspace/newcommunity_dev/ community@192.168.20.140:/home/product/community/saurabh/.
sudo su jenkins
sshpass -p "Devtest12" rsync -avzh --cvs-exclude /var/lib/jenkins/workspace/newcommunity_dev/ community@192.168.20.140:/home/product/community/saurabh/.
**************************************Git-web****************
https://gist.github.com/peter279k/6ac3a8a8ef2e1f24a48679713af50969
###################################33
cd REPONAME
git init
git add .
git commit -m 'initial commit' -a
git remote add origin git@gitserver:.git
git push origin master:refs/heads/master
git push --set-upstream origin master
No comments:
Post a Comment