Showing posts with label ubuntu. Show all posts
Showing posts with label ubuntu. Show all posts

Friday, September 9, 2011

Setup Irscci on Ubuntu

Here are the steps while I was trying to learn setting up shell based IRC Client (I opted for Irssi ) on Ubuntu
  1. Install irscci: sudo apt-get install irssi
  2. Start irscci: irscci
  3. Connect to an irc server e.g. /connect irc.freenode.net
  4. Choose some screen name which should be unique:
    1. /set nick <unique_nick_name>
  5. You can opt to register this nickname and verify it
    1. /msg nickserv register <password> <email>
    2. To switch between message and current window use Alt+a, Alt+1, Alt+2
  6. An email will be triggered with a verification command of the format: /msg NickServ VERIFY REGISTER <nickname> <passcode>
  7. Join any group with groupname: /join <ircroom> e.g. /join ubuntu
  8. To autoregister the nickname, use the following command
    1. /network add -autosendcmd "/msg nickserv identify password ;wait 2000" freenode


Sunday, June 19, 2011

Setup Bitbucket using SSH on Ubuntu

Bitbucket is a good alternate to Github which provides free unlimited private hosting upto 5 collaborators. It uses Mercurial which is DVCS.

I prefer SSH over HTTP to access work on my repository. The steps to setup are as follows:
  1. Signup on Bitbucket (Obviously)
  2. Create a repository after login using Repository -> Create New Repository
  3. Install mercurial on your local system
    1. sudo apt-get install mercurial
  4. Create the Mercurial Configuration File
    1. vi ~/.hgrc
    2. [ui]
      editor = vi
      username = FIRST_NAME LAST_NAME <email>
      
  5. Create SSH Key if not present on your local system  using the following steps
    1. ssh-keygen
    2. The generated key files are stored under ~/.ssh
  6. Upload the ~/.ssh/id_rsa.pub file to Bitbucket under Account -> SSH Keys
  7. Setup the Key in Ubuntu
    1. chmod 644 ~/.ssh/id_rsa.pub
      ssh-agent bash
      ssh-add
  8. Now clone the repository from remote server
    1. hg clone ssh://hg@bitbucket.org/<username>/<repository>
  9. To add and commit code use the following commands
    1. hg add <file/folder>
      hg commit -m '<commit message>'
      hg push
     
    A very good reference for basic Mercurial is
http://hgbook.red-bean.com/read/mercurial-in-daily-use.html
     


    Thursday, June 9, 2011

    Generate ssh keys

    By default ssh-keygen generates a RSA private/public key pair.

    To generate a DSA Key

    ssh-keygen -t dsa -b 1024 

    The option -t is for the type of encryption (dsa/rsa)
    The option -b is for the number of bits for encryption (1024,2048 etc)