Difference between revisions of "Github manual for Ubuntu"
Line 19: | Line 19: | ||
## Click: "SSH Keys" | ## Click: "SSH Keys" | ||
## Click: "Add another public key" | ## Click: "Add another public key" | ||
## Paste the copied content into the "key field" and press "Add key" | ## Paste the copied content into the "key field" and press "Add key" <br> <br> | ||
# Open the terminal again and type the following command: <br> <br> <code>ssh-add</code> <br> <br> This is only required if you use ubuntu (which all the readers of this document should, as described in the introduction.) | |||
Your setup for the ssh-key is completed! Now you are ready to install github. | Your setup for the ssh-key is completed! Now you are ready to install github. |
Revision as of 05:15, 26 September 2012
Introduction to Github
Developers often use a repository for developing their software projects. When using a repository, developers can upload and download the code developed for the project. Github is an open source repository site. For more information about repository's and Github, please visit Wiki GitHub. If you do not have a GitHub account and you would like to contribute to a project or develop a project on your own, please register at github.com and follow their "Bootcamp".
Github and Ubuntu
Github doesn't provide an easy step-by-step guide for using your repository with ubuntu, if you need (or would like) to use ubuntu and github together, we provide a nice and easy guide. This page will help you to Setup github for Ubuntu and use Github. At the end there will be a small summary or so called: "Cheatsheet" with the command's you might need.
Setup Github
When you have a github-account, you may install Github. Before installing Github, you need to set up the ssh keys.
Setup the SSH-key
- Open the terminal in Ubuntu.
- Type:
$cd ~/.ssh
When the terminal displays: ""bash: cd: ./.ssh:No such file or directory" you should generate a public/private rsa ket pair, continue with step 3.
If the terminal changes to ~/.ssh directory, continue with step 5. - Open a new terminal and type:
$ ssh-keygen -t rsa -C "your_email@youremail.com"
After hitting Enter, the terminal will say: 'Generating public/private rsa ket pair. Enter file in which to save the key(/Home/ubuntu/.ssh/id_rsa):' please press only enter and the terminal will ask to enter a passphrase. - Enter a suitable passphrase which is > 4 characters. If this is done, please continue with step 6.
- (Follow this step only if your terminal changed to "~/.ssh")
You already have some SSH-keys, following commands will backup (in folder "key_backup") and remove the keys. Type in your terminal:
$ mkdir key_backup
$ cd id_rsa* key backup
$ rm id_rsa*
- Add the SSH-key to github, type in the terminal:
$ gedit id_rsa.pub
- Ubuntu will open a file, copy it's entire content:
- Open the github site and login.
- Go to "Account Settings" (in the upper right corner from your page).
- Click: "SSH Keys"
- Click: "Add another public key"
- Paste the copied content into the "key field" and press "Add key"
- Open the terminal again and type the following command:
ssh-add
This is only required if you use ubuntu (which all the readers of this document should, as described in the introduction.)
Your setup for the ssh-key is completed! Now you are ready to install github.
Install Github
Open the terminal and type the following command:
$ sudo apt-get install git-core git-gui git-doc