Let’s Git it on!

Install Git

# yum install git
Loaded plugins: fastestmirror, langpacks
base | 3.6 kB 00:00:00
epel/x86_64/metalink | 5.4 kB 00:00:00
epel | 4.3 kB 00:00:00
extras | 3.4 kB 00:00:00
google-chrome | 951 B 00:00:00
nux-dextop | 2.9 kB 00:00:00
updates | 3.4 kB 00:00:00
epel/x86_64/primary_db FAILED ] 0.0 B/s | 1.2 MB –:–:– ETA
http://mirror.rise.ph/fedora-epel/7/x86_64/repodata/167fde3ffebcbd63c6850b6c2301b20d575eb884d2657a26003f078878c52a77-primary.sqlite.xz: [Errno 14] HTTP Error 404 – Not Found
Trying other mirror.
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn’t help to resolve this issue please create a bug on https://bugs.centos.org/

(1/5): epel/x86_64/group_gz | 170 kB 00:00:00
(2/5): updates/7/x86_64/primary_db | 4.8 MB 00:00:01
(3/5): epel/x86_64/updateinfo | 799 kB 00:00:04
(4/5): epel/x86_64/primary_db | 4.7 MB 00:00:07
(5/5): nux-dextop/x86_64/primary_db | 1.7 MB 00:00:11
Loading mirror speeds from cached hostfile
* base: mirror.qoxy.com
* epel: mirror.rise.ph
* extras: mirror.qoxy.com
* nux-dextop: mirror.li.nux.ro
* updates: mirror.qoxy.com
Resolving Dependencies
–> Running transaction check
—> Package git.x86_64 0:1.8.3.1-6.el7_2.1 will be installed
–> Processing Dependency: perl-Git = 1.8.3.1-6.el7_2.1 for package: git-1.8.3.1-6.el7_2.1.x86_64
–> Processing Dependency: perl(Term::ReadKey) for package: git-1.8.3.1-6.el7_2.1.x86_64
–> Processing Dependency: perl(Git) for package: git-1.8.3.1-6.el7_2.1.x86_64
–> Processing Dependency: perl(Error) for package: git-1.8.3.1-6.el7_2.1.x86_64
–> Running transaction check
—> Package perl-Error.noarch 1:0.17020-2.el7 will be installed
—> Package perl-Git.noarch 0:1.8.3.1-6.el7_2.1 will be installed
—> Package perl-TermReadKey.x86_64 0:2.30-20.el7 will be installed
–> Finished Dependency Resolution

Dependencies Resolved

======================================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================================
Installing:
git x86_64 1.8.3.1-6.el7_2.1 base 4.4 M
Installing for dependencies:
perl-Error noarch 1:0.17020-2.el7 base 32 k
perl-Git noarch 1.8.3.1-6.el7_2.1 base 53 k
perl-TermReadKey x86_64 2.30-20.el7 base 31 k

Transaction Summary
======================================================================================================================================================
Install 1 Package (+3 Dependent packages)

Total download size: 4.5 M
Installed size: 22 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): git-1.8.3.1-6.el7_2.1.x86_64.rpm | 4.4 MB 00:00:07
(2/4): perl-Git-1.8.3.1-6.el7_2.1.noarch.rpm | 53 kB 00:00:00
(3/4): perl-TermReadKey-2.30-20.el7.x86_64.rpm | 31 kB 00:00:00
(4/4): perl-Error-0.17020-2.el7.noarch.rpm | 32 kB 00:00:10
——————————————————————————————————————————————————
Total 425 kB/s | 4.5 MB 00:00:10
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:perl-Error-0.17020-2.el7.noarch 1/4
Installing : perl-TermReadKey-2.30-20.el7.x86_64 2/4
Installing : git-1.8.3.1-6.el7_2.1.x86_64 3/4
Installing : perl-Git-1.8.3.1-6.el7_2.1.noarch 4/4
Verifying : perl-Git-1.8.3.1-6.el7_2.1.noarch 1/4
Verifying : perl-TermReadKey-2.30-20.el7.x86_64 2/4
Verifying : 1:perl-Error-0.17020-2.el7.noarch 3/4
Verifying : git-1.8.3.1-6.el7_2.1.x86_64 4/4

Installed:
git.x86_64 0:1.8.3.1-6.el7_2.1

Dependency Installed:
perl-Error.noarch 1:0.17020-2.el7 perl-Git.noarch 0:1.8.3.1-6.el7_2.1 perl-TermReadKey.x86_64 0:2.30-20.el7

Complete!

Generate SSH Keys

# ssh-keygen -t rsa -b 4096 -C “youremail@address.com”
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa.
Your public key has been saved in /root/.ssh/id_rsa.pub.
The key fingerprint is:
fe:41:cc:88:23:0f:9d:0d:8b:f4:b6:a6:2f:70:45:4f youremail@address.com
The key’s randomart image is:
+–[ RSA 4096]—-+
| |
| . E |
| …o |
| . +.*.+ |
| +.O S + |
| . .= + . |
| o + . . |
| .o . . |
| .o. . |
+—————–+

Add your SSH key to your SSH agent.

Start SSH agent in the background

# eval “$(ssh-agent -s)”
Agent pid 11120

Add your SSH private key to the ssh-agent

#ssh-add ~/.ssh/id_rsa
Enter passphrase for /root/.ssh/id_rsa:
Identity added: /root/.ssh/id_rsa (/root/.ssh/id_rsa)

Add the SSH key to your Github account

First, copy the SSH key to your clipboard.

# xclip -sel clip < ~/.ssh/id_rsa.pub

Login to your Github account and inn the upper-right corner of any page, click your profile photo, then click Settings.

In the user settings sidebar, click SSH and GPG keys.

Click New SSH key or Add SSH key

In the Title filed add a descriptive name for this SSH key. Paste your key into the “Key” field

Click Add SSH key

If prompted enter your Github password.

You now have Git configured!

Leave a Reply