GIT Setup
1) sudo yum install "Development Tools"
2) sudo yum install gettext-devel openssl-devel perl-CPAN perl-devel curl-devel zlib-devel
3) sudo yum install wget
4) wget https://mirrors.edge.kernel.org/pub/software/scm/git/
5) extract git-2.7.2.tar.gz
6) cd to git-2.7.2 then enter
7) make configure
8) ./configure --prefix=/usr/local
9) sudo make install
10) Check git version
git --version
11) Enter the below configuration
git config --global user.name "pakkapoti"
git config --global user.email "web.xml@gmail.com"
git config --list
12) ssh-keygen -t rsa -b 4096 -C "web.xml@gmail.com"
13) eval "$(ssh-agent -s)"
ssh-agent bash
14) ssh-add /home/ansadm/.ssh/id_rsa.pub
If you receive the below error, install curl-devel package like below and re-run command again
Error:
Could not open a connection to your authentication agent.
15) yum install curl-devel
16) copy the id_rsa.pub content and paste into github profile SSH keys category
17) ssh -T git@github.com
SSH keys section turn into green
18) mkdir -p /home/ansadm/git-repo
19) cd /home/ansadm/git-repo
git init
20) create a git repository with name ansible_workshop
21) git remote set-url origin git@github.com:pakkapoti/ansible_workshop.git
(or)
get remote add origin https://github.com/pakkapoti/ansible_workshop.git
22) git pull origin master
you should see the below output
[ansadm@ansible-control git-repo]$ git pull origin master
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), done.
From github.com:pakkapoti/ansible_workshop
* branch master -> FETCH_HEAD
* [new branch] master -> origin/master
Made the changes locally and push to GIT
23) git push origin master
Reference:
https://youtu.be/0yRkRiQUgWo?list=PL9ooVrP1hQOGwtQOt8ZBlVjFlI-9Vr5hx
https://youtu.be/b5oQZdzA37I?list=PL9ooVrP1hQOGwtQOt8ZBlVjFlI-9Vr5hx
https://youtu.be/1MVQYSlgXrI?list=PL9ooVrP1hQOGwtQOt8ZBlVjFlI-9Vr5hx
https://youtu.be/tjVsGOGExh4?list=PL9ooVrP1hQOGwtQOt8ZBlVjFlI-9Vr5hx
Made the changes locally and push to GIT
23) git push origin master
Reference:
https://youtu.be/0yRkRiQUgWo?list=PL9ooVrP1hQOGwtQOt8ZBlVjFlI-9Vr5hx
https://youtu.be/b5oQZdzA37I?list=PL9ooVrP1hQOGwtQOt8ZBlVjFlI-9Vr5hx
https://youtu.be/1MVQYSlgXrI?list=PL9ooVrP1hQOGwtQOt8ZBlVjFlI-9Vr5hx
https://youtu.be/tjVsGOGExh4?list=PL9ooVrP1hQOGwtQOt8ZBlVjFlI-9Vr5hx
No comments:
Post a Comment