After installing the freshcopy of ubuntu 11.04, I need to clone my already existing
github repository to my local drive to start gitting. Following are the steps, I had done to Clone the Existing git repository and start Gitting.
1 . Generate SSH keys for the repository. I tried to use already existing key in the github repo but I end up with an error. So created a new keygen by
2. Copy the Newly generated SSH key.
3. Now Login to your Github account and Goto the Repository's administration and goto 'Deploy keys', click Edit and paste the new key.
4. Now Goto following repository's page and copy the url as highlighted below:
5. Clone the repo to your Local drive:
6.Now start Gitting:
Some Errors which I had Encountered During Git installation:
Permission denied (publickey):
github repository to my local drive to start gitting. Following are the steps, I had done to Clone the Existing git repository and start Gitting.
1 . Generate SSH keys for the repository. I tried to use already existing key in the github repo but I end up with an error. So created a new keygen by
ravikumar@ravikumar-desktop:~$ssh-keygen -t rsa -C "XXXX@gmail.com"
2. Copy the Newly generated SSH key.
ravikumar@ravikumar-desktop:~$ cd .ssh
ravikumar@ravikumar-desktop:~/.ssh$ gedit id_rsa.pub
copy the entire key. 3. Now Login to your Github account and Goto the Repository's administration and goto 'Deploy keys', click Edit and paste the new key.
4. Now Goto following repository's page and copy the url as highlighted below:
Github url |
5. Clone the repo to your Local drive:
ravikumar@ravikumar-desktop:~$ git clone git@github.com:XXXX/codehacks.git
Cloning into codehacks...
remote: Counting objects: 304, done.
remote: Compressing objects: 100% (238/238), done.
remote: Total 304 (delta 60), reused 256 (delta 49)
Receiving objects: 100% (304/304), 3.83 MiB | 16 KiB/s, done.
Resolving deltas: 100% (60/60), done.
6.Now start Gitting:
ravikumar@ravikumar-desktop:~$ cd codehacks
ravikumar@ravikumar-desktop:~/codehacks$ ls
ADS Readme.txt Cobol Readme.txt Ruby
Advanced Data Structures C++ Readme.txt Ruby Readme.txt
ALP DBMS Solve Euler
ALP_Readme.txt Java Solve Euler Readme.txt
C++ Java.txt VB6
C Codes My Package Works VB6.txt
C Codes Readme.txt My Package Works Readme.txt
Cobol Readme.txt
ravikumar@ravikumar-desktop:~/codehacks$ gedit Readme.txt
ravikumar@ravikumar-desktop:~/codehacks$ git init
Reinitialized existing Git repository in /home/ravikumar/codehacks/.git/
ravikumar@ravikumar-desktop:~/codehacks$ git add *
ravikumar@ravikumar-desktop:~/codehacks$ git status
# On branch master
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# modified: Readme.txt
#
ravikumar@ravikumar-desktop:~/codehacks$ git commit -m -a
[master 076e766] -a
1 files changed, 1 insertions(+), 1 deletions(-)
ravikumar@ravikumar-desktop:~/codehacks$ git push origin master
Happy Gitting :)Some Errors which I had Encountered During Git installation:
Permission denied (publickey):
ravikumar@ravikumar-desktop:~/.ssh$ ssh git@github.com
Agent admitted failure to sign using the key.
Permission denied (publickey).
solved by
ravikumar@ravikumar-desktop:~/.ssh$ ssh-add ~/.ssh/id_rsa
Identity added: /home/ravikumar/.ssh/id_rsa (/home/ravikumar/.ssh/id_rsa)
Comments
Post a Comment