viernes, 16 de mayo de 2014

Gitlab push on mail not working

The solution was in the issue:
https://github.com/gitlabhq/gitlabhq/issues/6725

Basically you should use this patch:

diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
index 46aa34d..57ce69e 100644
--- a/app/mailers/emails/projects.rb
+++ b/app/mailers/emails/projects.rb
@@ -26,7 +26,7 @@ module Emails
       if @commits.length > 1
         @target_url = project_compare_url(@project, from: @commits.first, to: @commits.last)
       else
-        @target_url = project_commit_url(@project, @compare.commit)
+        @target_url = project_commit_url(@project, id: @compare.commit.id)
       end

       mail(from: sender(author_id), 
 
 
Or update your gitlab.

lunes, 28 de abril de 2014

Code Review with Redmine and Gitolite

First of all ofcourse I connected to the server throught ssh:
ssh me@server
After that I downloaded the code-review plugin from the repo
wget https://bitbucket.org/haru_iida/redmine_code_review/downloads/redmine_code_review-0.6.3.zip
That was the last download that I found, you should check it out to if there is a new version to download, or clone the repo.
Unzip:
unzip redmine_code_review-0.6.3.zip 

After install, you should configure the plugin in Redmine -> Settings
Setup user/roles permissions for the plugin Settings -> Role, User

Setup the repository for each project needed (Settings -> Repository).

Permission problems:
Create redmine group:
groupadd redmine
Add www-data to redmine group:
usermod -aG redmine www-data
If you want you could also add git user to that group:
usermod -aG redmine git

Change permissions:
sudo chmod 770 -R /hom/git/repositories
sudo chown git:redmine /home/git/repositories -R

And finally issues with gitolite and redmine:

Edit the .gitolite.rc file and to change the umask.
  1. the default umask for repositories is 0077; change this if you run stuff
  2. like gitweb and find it can't read the repos. Please note the syntax; the
  3. leading 0 is required
#$REPO_UMASK = 0077; # gets you 'rwx------'
#$REPO_UMASK = 0027; # gets you 'rwxr-x---'
$REPO_UMASK = 0022; # gets you 'rwxr-xr-x'

In my case it was actually:

UMASK                       =>  0022,