Thursday, June 7, 2012

Gigantic mac machine make me nervous

one of the scary day..setting up mac machine with new data and software i have to matt helped me a lot

scary part 1

started fetching all projects from github to mac and saw stupid error in bash terminal



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)?

if  i type yes,another error


Failed to add the host to the list of known hosts (/Users/ziffdavis/.ssh/known_hosts).
Write failed: Broken pipe
fatal: The remote end hung up unexpectedly

finally after struggling for a while asked matt to resolve it who is expertis in linux than me

1)cd ~/
2)ls -la
3)cd .ssh (lists all ssh files)
4)cat id_rsa.pub
   which has "twhidden" rights on it so we decided it to change it to mine
5)created back up of all ssh files in folder "bak"
  cd bak
6)ls -la(  lists all ssh files in bak folder)
7)cd .ssh (displays bak)
8) mv bak/* ./(moved all files from bak to .ssh)
9)ls -la (displays bak along with .ssh files)
10)sudo cp id_rsa* bak  (copied all id_rsa files to bak folder)
11)ls bak/(see list of files in bak)
12)ls .ssh(see list of files on ssh)
13)sudo rm id_rsa*(remove id_rsa files from ssh)
14)sudo ssh-keygen -t rsa -C "slingala@ziffdavis.com'
 

           Generating public/private rsa key pair.
Enter file in which to save the key (/var/root/.ssh/id_rsa): /Users/ziffdavis/.ssh/id_rsa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /Users/ziffdavis/.ssh/id_rsa.
Your public key has been saved in /Users/ziffdavis/.ssh/id_rsa.pub.
The key fingerprint is:
f5:ea:4d:ca:a9:2a:ef:f9:65:e0:3b:60:99:a9:a7:e9 slingala@ziffdavis.com

15) go to folder "ZDCSE" where you want to fetch data from git
 16) cat ~/.ssh/id_rsa.pub

       ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCzpY2FGGkvAV4A4VDxrWIbfQnMMMYQrrRoMgIvwRr2Hv3KQnjL8EMDSjNEsnuL2T3rsMSof1uSloLNOdDRBbGaRk4jxFRZE9kfnCtKBHveO4zRObzR+as3HDpNjcT7H2x8x2xE3IF/1nz+cB8eB8ankhw+Pm9BKbWhMQkOgcXo2IZ1G8i+0Apj5XaQC9f3Vs608ShuJjZl4vRhwKfnSOzgr9lELgupv8JkPY2b78Crg4y3ZwDrFe2SfnEhiIA8HJ2LbII+UwR320bGXqkV8mpg2Yiy0PIYgj+BPXsboyvaBkHUz+H5N0SSRnNz8x1ktlcmakTVQt5qzrlkH8aU4NLL slingala@ziffdavis.com

copy this file in github as new ssh key

17) do pbcopy < ~/.ssh/id_rsa.pub
18)give read and write access to folders

     $sudo chown -R ziffdavis  /users/ziffdavis/.ssh



19)Finally your permissions on folder is changed and now bale to merge,clone and fetch from git



No comments:

Post a Comment