Getting started with gitlab

Installation for Debian 8

curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
sudo apt-get install gitlab-ce

sudo gitlab-ctl reconfigure

https://about.gitlab.com/downloads/#debian8

Restarting gitlab

To restart web service

gitlab-ctl restart
ok: run: gitlab-workhorse: (pid 29291) 0s
ok: run: logrotate: (pid 29299) 1s
ok: run: nginx: (pid 29305) 0s
ok: run: postgresql: (pid 29313) 0s
ok: run: redis: (pid 29327) 1s
ok: run: sidekiq: (pid 29331) 0s
ok: run: unicorn: (pid 29336) 1s

Reconfigure gitlab settings

La configuración de gitlab se guarda en un archivo .yml, que se genera a través de :

emacs /etc/gitlab/gitlab.rb
sudo gitlab-ctl reconfigure

To locate configuration files in our system

find / -name gitlab.rb
find / -name gitlab.yml

Logging

Gitlab logs are separated in three files: application, sidekiq and production

tail -f /var/log/gitlab/gitlab-rails/production.log
tail -f /var/log/gitlab/gitlab-rails/application.log
tail -f /var/log/gitlab/gitlab-rails/sidekiq.log

Code highlighting

For highlighting source code, Gitlab uses Rouge module.

To know whether a language will be coloured or not, they have this awesome website where you can actually test colouring different code snippets.

Available grammars are in Github.

Git: Iniciación a git

Instalación del servidor para acceso mediante ssh con usuario en Debian

sudo apt-get install git
sudo mkdir -p /var/cache/git
cd /var/cache/git
git init --bare mynewgit

 

Configuración de básica
git config --global user.name "Your Name Here"
git config --global user.email "your_email@example.com"
git config --global http.proxy   http://myproxy.org:80
#Añadir user a url
git remote set-url origin https://USER@github.com/user/mygit.git

Clonación de repositorio git

git clone https://server/repo

Bajar última versión

git pull

 Crear carpeta

mkdir folder1 folder2
git add  folder1 folder2
git commit -m "folder1"
git push origin

Cambiar el origen de git (servidor remoto)

git remote show origin

git remote rename origin old

git remote add origin myserver