Skip to content

Commit

Permalink
CI: More generically fix permission errors (#1215)
Browse files Browse the repository at this point in the history
* CI: More generically fix permission errors

Disable git security check for any folder.
We are running a docker container on GHA. Chances are low that this gets compromised.

* Revert changes to source Dockerfile

These are inherited from ci.
  • Loading branch information
rhaschke authored May 9, 2022
1 parent b04c7bb commit 806cce4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 14 deletions.
10 changes: 4 additions & 6 deletions .docker/ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ RUN \
clang clang-format-12 clang-tidy clang-tools \
ccache && \
#
# Fetch all dependencies from moveit2.repos
# As of 5/2/2022, permissions need to be set explicitly.
# See https://github.com/actions/checkout/issues/760.
git config --global --add safe.directory /home/runner/work/moveit2/moveit2/.work/upstream_ws/src/geometric_shapes && \
git config --global --add safe.directory /home/runner/work/moveit2/moveit2/.work/upstream_ws/src/moveit_resources && \
git config --global --add safe.directory /home/runner/work/moveit2/moveit2/.work/upstream_ws/src/srdfdom && \
# Globally disable git security
# https://github.blog/2022-04-12-git-security-vulnerability-announced
git config --global --add safe.directory "*" && \
#
# Fetch all dependencies from moveit2.repos
vcs import src < src/moveit2/moveit2.repos && \
if [ -r src/moveit2/moveit2_${ROS_DISTRO}.repos ] ; then vcs import src < src/moveit2/moveit2_${ROS_DISTRO}.repos ; fi && \
#
Expand Down
9 changes: 1 addition & 8 deletions .docker/source/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ COPY . src/moveit2
RUN --mount=type=cache,target=/root/.ccache/ \
# Enable ccache
PATH=/usr/lib/ccache:$PATH && \
#
# Fetch all dependencies from moveit2.repos
# As of 5/2/2022, permissions need to be set explicitly.
# See https://github.com/actions/checkout/issues/760.
git config --global --add safe.directory /home/runner/work/moveit2/moveit2/.work/upstream_ws/src/geometric_shapes && \
git config --global --add safe.directory /home/runner/work/moveit2/moveit2/.work/upstream_ws/src/moveit_resources && \
git config --global --add safe.directory /home/runner/work/moveit2/moveit2/.work/upstream_ws/src/srdfdom && \
#
# Fetch required upstream sources for building
vcs import src < src/moveit2/moveit2.repos && \
if [ -r src/moveit2/moveit2_${ROS_DISTRO}.repos ] ; then vcs import src < src/moveit2/moveit2_${ROS_DISTRO}.repos ; fi && \
#
Expand Down

0 comments on commit 806cce4

Please sign in to comment.