Page MenuHomePhabricator

wikimedia-portals-build permission error: "dubious ownership in repository"
Closed, ResolvedPublicBUG REPORT

Description

The Jenkins wikimedia-portals-build job is failing with the the following error:
It seems like there is a permission error with Git accessing the workspace directory.

04:22:06 + cd src/
04:22:06 + git submodule update --init
04:22:06 fatal: detected dubious ownership in repository at '/srv/jenkins/workspace/wikimedia-portals-build/src'
04:22:06 To add an exception for this directory, call:
04:22:06 
04:22:06 	git config --global --add safe.directory /srv/jenkins/workspace/wikimedia-portals-build/src
04:22:07 Build step 'Execute shell' marked build as failure

Event Timeline

Change 886901 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[integration/config@master] Mark working dir as safe for wikimedia-portals-build job

https://gerrit.wikimedia.org/r/886901

Looks like this is a known issue and related to T325128 due to a new Git feature.

Indeed, we had the same issue with wikidata query builder service T328441. We will want to move the commands from JJB (which runs as jenkins-deploy on the host` to the repository and have them run by a container (running as nobody). For that other repository, they have filed the follow up task T328543 and this wikimedia/portals would need a similar task.

hashar assigned this task to Jdrewniak.

I have updated the Jenkins job with your patch. The build should work now.

Change 886901 merged by jenkins-bot:

[integration/config@master] jjb: Mark working dir as safe for wikimedia-portals-build job

https://gerrit.wikimedia.org/r/886901

Change 886927 had a related patch set uploaded (by Jdrewniak; author: Jdrewniak):

[integration/config@master] jjb: Followup to 28dc208e

https://gerrit.wikimedia.org/r/886927

Change 886927 merged by jenkins-bot:

[integration/config@master] jjb: Followup to 28dc208e

https://gerrit.wikimedia.org/r/886927

Change 891485 had a related patch set uploaded (by Hashar; author: Hashar):

[integration/config@master] jjb: drop git safe.directory for wikimedia-portals-build

https://gerrit.wikimedia.org/r/891485

Change 891485 merged by jenkins-bot:

[integration/config@master] jjb: drop git safe.directory for wikimedia-portals-build

https://gerrit.wikimedia.org/r/891485

A follow up task got filed T330194 cause we do a git operation on ./src/prod but only allowed ./src. I went ahead and allowed any directory by setting safe.directory='*'.

https://integration.wikimedia.org/ci/job/wikimedia-portals-build/ passed and succeeded:

https://gerrit.wikimedia.org/r/c/wikimedia/portals/deploy/+/891486
Assets build - 2023-02-23 08:04:01+00:00 [NEW]