Skip to content

Instantly share code, notes, and snippets.

@nitheeshkm
Created January 4, 2022 17:41
Show Gist options
  • Save nitheeshkm/7453bfcbcfb07f72f0b092965e45cf1c to your computer and use it in GitHub Desktop.
Save nitheeshkm/7453bfcbcfb07f72f0b092965e45cf1c to your computer and use it in GitHub Desktop.

Revisions

  1. nitheeshkm created this gist Jan 4, 2022.
    57 changes: 57 additions & 0 deletions github_manual
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,57 @@
    #Source and credits: https://wiki.paparazziuav.org/wiki/Github_manual_for_Ubuntu

    #Setup Github
    When you have a github-account, you may install Github. Before installing Github, you need to set up the ssh keys. This manual will also guide you trough cloning and configurnig with github.

    #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 "[email protected]"

    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

    Your terminal will download some things and install github automaticly. When it's done, your installation is complete! The next step is getting your local copy of the repository (or code-branch), follow the instructions for "Cloning".

    #Cloning
    Cloning is a way of downloading a local copy of your project. The following command will clone the code branch, just replace "username" with you GitHub username and project name with the name of project on github:

    $ git clone [email protected]:username/projectname.git

    Be aware, do not misspell the command, it won't work. If you are having trouble, read the given error and try to solve him by reading the following page