Open link in a new tab

Content

Expand project menu

SERVER_GROUP and local git repo permissions

Hi everyone, 

I installed OpenProject with git integration. It runs on the same server as my Gitea git server instance. 

What I try to achieve is to create a OP managed repo, which then appears in Gitea. 

But right now all repos are created by user openproject and group www-data, which obviously leads to a permission problem because gitea expects gitea:gitea

I created openproject.git via gitea - and it shows gitea:gitea permissions. 
demo-project.git was created via OP and shows openproject:www-data

sudo ls -lat /var/lib/gitea/data/gitea-repositories/org
total 16
drwxrwx--- 7 openproject www-data 4096 May 12 06:25 demo-project.git
drwxrwsr-x 4 gitea       gitea    4096 May 12 06:25 .
drwxrwsr-x 7 gitea       gitea    4096 May 11 20:01 openproject.git
drwxrwsr-x 3 gitea       gitea    4096 May 11 20:01 ..

configuration.yml was created by the configuration script: 

default:
<% git_configured = ENV['GIT_REPOSITORIES'].present? %>
<% svn_configured = ENV['SVN_REPOSITORIES'].present? %>
<% if git_configured || svn_configured %>
  scm:
  <% if git_configured %>
    git:
      manages: <%= ENV['GIT_REPOSITORIES'] %>
      mode: 0770
      group: <%= ENV['SERVER_GROUP'] %>
  <% end %>

Can I somehow change SERVER_GROUP and add user openproject to group gitea?


Any input is highly welcome. 

Best

Tom



Message actions

PS: What I see in the log is this: 
/opt/openproject/lib/tasks/scm.rake:69:in 'block (3 levels) in <top (required)>': WARNING: Managed repository path set to '/var/lib/gitea/data/gitea-repositories/org', but does not exist for SCM vendor Git! (StructuredWarnings::StandardWarning)

But the setting is correct:

openproject config:get GIT_REPOSITORIES
/var/lib/gitea/data/gitea-repositories/org
Message actions

For anyone who is interested in a, possible, solution: 
I added the user openproject to the group gitea and create a new var GIT_GROUP=gitea
Then I changed the config to: 
    mode: 0770      group: <%= ENV['GIT_GROUP'] %>

This way I can at least integrate existing repos into OP