How to setup for ssh communication with TURBOMOLE's gitlab server:
- Go to your .ssh directory:
cd ~/.ssh - Create a ssh public/private key pair with:
ssh-keygen -t rsa -b 4096 -C "x.y@rub.de" -f id_rsawhere you need to replace x and y by your first and last name. - You should now have two different ssh key pairs in your .ssh directory. One for the connection to the different nodes of the cluster (intel2, amd1, amd2, ...), which should in most of your cases been called id_dsa/id_dsa.pub and the recently created key pair for the connection to turbogit.de.
To automatically choose the correct key for these connections you have to modify your ssh config file as follows:
Open the file ~/.ssh/config ( if it does not exist, just create it) and append the following lines:
host turbogit.de user turbogit-username identityfile ~/.ssh/id_rsaYou need to replace turbogit-username with your own turbogit username. If you dont know your username by heart you can find it in your profile on the turbogit webpage. - Go to the website turbogit.de and log in.
- Click in the upper right site on your profile (photo) and select "Settings" from the drop-down menu.
- On the left site click on "SSH Keys"
- Paste all the content from the file ~/.ssh/id_rsa.git.pub to the box provided and click on the "Add Key" button.
- Go back to https://turbogit.de/turbomole/turbomole. Just bewow the line "The official Turbomole git repository" there should be a drop down menu with the default selection "HTTPS". Change this to "SSH" and copy the URL right next to it.
Configuring git:
Before starting to actually work with git one should set a few defaults
git config --global user.name "Christof Haettig" git config --global user.email "christof.haettig@rub.de" git config --global rebase.master true git config --global core.excludefiles ~/.gitignore_global
- With the core.excludefiles options you set a file name (here ~/.gitignore_global)
where you can define a number of directories, files, or file types that will be globally ignored by git.
Gobally means here: with all git repositories to which you might work.
It is recommended to specify in this file automatically generated backup files or directories that one typicall never wants to add to git.
For example, put into this file the following lines:
*~ *.swp *.swo .DS_Store
- Setting rebase.master true changes the default behavour of git during the pull of updates from a remote repository. This option will enfore that your local feature branches that you created by branching from the master branch are upated by rebasing them to the current head of the master instead of merging the changes from the master into your feature branch. This will leave to easier understandable histories in the remote repository which is helpful to understand later how the code was changed at which point. (Prevents e.g.\ so-called fox-trott commits.)
- Whenever you commit changes to git it will open an editor to enter a log message. By default git uses for this the editor you defined in your environment variable $VISUAL. If you want to use with git a different editor you can set it with
git config --global core.editory emacs
Cloning the turbomole git repository:
Now, you should be able to communicate with the server. For example, if you want to checkout/clone a fresh TURBOMOLE version, use the command:
git clone git@turbogit.de:turbomole/turbomole.git
This will create in your current working directory a subdirectory "TURBOMOLE" and clone the code repository into it. If you want to clone the code into a different directory you add its name or path as a third argument to the above command.