Created
February 11, 2015 00:28
-
-
Save deepaknverma/9cb353d80326d43eb834 to your computer and use it in GitHub Desktop.
Install git on Ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apt-get install libcurl4-gnutls-dev libexpat1-dev gettext \ libz-dev libssl-dev | |
apt-get install git-core | |
cd ~/.ssh | |
ls -al | |
# Lists the files in your .ssh directory | |
ssh-keygen -t rsa -C "[email protected]" | |
# Creates a new ssh key, using the provided email as a label | |
# Generating public/private rsa key pair. | |
# Enter file in which to save the key (/home/you/.ssh/id_rsa): | |
Enter passphrase (empty for no passphrase): [Type a passphrase] | |
# Enter same passphrase again: [Type passphrase again] | |
Your identification has been saved in /home/you/.ssh/id_rsa. | |
# Your public key has been saved in /home/you/.ssh/id_rsa.pub. | |
# The key fingerprint is: | |
# 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db [email protected] | |
ssh-add ~/.ssh/id_rsa | |
sudo apt-get install xclip | |
# Downloads and installs xclip. If you don't have `apt-get`, you might need to use another installer (like `yum`) | |
xclip -sel clip < ~/.ssh/id_rsa.pub | |
# Copies the contents of the id_rsa.pub file to your clipboard | |
Now that you have the key copied, it's time to add it into GitHub: | |
Test everything out | |
ssh -T [email protected] | |
# Attempts to ssh to github | |
... | |
Agent admitted failure to sign using the key. | |
debug1: No more authentication methods to try. | |
Permission denied (publickey). | |
The authenticity of host 'github.com (207.97.227.239)' can't be established. | |
# RSA key fingerprint is 16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48. | |
# Are you sure you want to continue connecting (yes/no)? | |
Hi username! You've successfully authenticated, but GitHub does not | |
# provide shell access |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment