Skip to content

Prepare Development Environment in Ubuntu 10.04

sevntu-checkstyle edited this page Jun 4, 2011 · 12 revisions

This manual was created for Ubuntu 10.04 before I found http://help.github.com/linux-set-up-git/

  1. Install Git in Ubuntu:
sudo apt-get install git-core
  1. Install Grafic User Interface (GUI) for git:
sudo apt-get install git-gui

Run GUI by command "git gui", If you do not like ugly font apply following:

sudo aptitude install tk8.5
sudo update-alternatives --config wish

and pick /usr/bin/wish8.5 from the list (3)

  1. Just another GUI for git management
sudo apt-get install giggle 

Install Maven3

  1. Download binaries http://maven.apache.org/download.html

  2. Unpack them and copy to /usr/shared/maven3

  3. add to ~/.bashrc

export M2_HOME=/usr/share/maven3
export M2=$M2_HOME/bin
export PATH=$M2:$PATH

===============================================================================

Resources to read

http://progit.org/book/

http://progit.org/book/ru/

http://githowto.com/

Manual how to install GIT on Eclipse:

http://www.vogella.de/articles/EGit/article.html

http://www.eclipse.org/egit/download/ - download plugin for Eclipse

=============================================================================== Local GitHub Config: http://github.com/blog/180-local-github-config

=============================================================================== Global Setup: http://help.github.com/git-email-settings/

Setting user name and email globally in git: $ git config --global user.name "YourName" $ git config --global user.email "Your e-mail"

Overriding settings for individual repos: $ cd my_other_repo $ git config user.name "YourName" $ git config user.email "Your e-mail"

For checking the information: $ git config --global github.user

=============================================================================== Create work folder(sevntu.checkstyle) and test it:

$ cd /**/workspace/ $ mkdir sevntu.checkstyle $ cd sevntu.checkstyle $ git init $ touch ReadMe $ git add ReadMe $ git commit -m 'first commit' $ git remote add origin [email protected]:sevntu-checkstyle/sevntu.checkstyle.git $ git push origin master

If after this steps you see error message about lost history run: $ git pull origin master

=============================================================================== Problems with GIT and Eclipse?!

Solving some questions you can find at http://help.github.com/remotes/

  1. Push --> Permission denied (publickey): http://help.github.com/troubleshooting-ssh/

Finding what keys ssh is offering to the server is fairly simple. Run $ ssh -v [email protected] and look at the output.

This is usually caused when ssh cannot find your keys. Make sure your key is in the default location, ~/.ssh. If you run $ ssh-keygen and just press enter at all 3 prompts it will be placed to /home/UserName/.ssh/ automatically. Then you can add the contents of id_rsa.pub to my github keys. If id_rsa.pub doesn’t work try id_dsa.pub. You might need to generate a new dsa key with ssh-keygen -t dsa if you just have an rsa key.

Then insert content from id_rsa.pub to web site http://github.com/sevntu-checkstyle/sevntu.checkstyle : a) open your git web page b) Account Settings --> SSH Public Keys --> Add another public key c) And copy content.

  1. Push --> "Can't connect to any URI:" error when attempting to push a change to a local file origin repository:

Bug. Edit the "config" file of your respository, typically found at <your repository's directory>/.git/config. (for example: /home/danil/workspace/my/sevntu.checkstyle/.git/config). Copy the line starting with "url =" and paste it, replacing "url" with "pushurl". The resulting section in the config file would look similar to

[remote "origin"] url = git+ssh://[email protected]/sevntu-checkstyle/sevntu.checkstyle.git fetch = +refs/heads/master:refs/remotes/origin/master push = refs/heads/master:refs/heads/master pushurl = git+ssh://[email protected]/sevntu-checkstyle/sevntu.checkstyle.git [branch "master"] remote = origin merge = refs/heads/master

After saving the file, the wizard should work again. Information from site https://bugs.eclipse.org/bugs/show_bug.cgi?id=317389

=============================================================================== Useful links: http://wiki.eclipse.org/EGit/User_Guide http://help.github.com/troubleshooting-ssh/ http://help.github.com/remotes/ http://git-scm.com/ http://www.kernel.org/pub/software/scm/git/docs/user-manual.html#Updating-a-repository-With-git-fetch