From 0b31c1377e1d1aa1cbe7392579ca64a3af512634 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Wed, 27 Mar 2024 19:05:15 +0100 Subject: [PATCH] chore(kb/gitlab): troubleshoot missing permissions --- knowledge base/gitlab.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/knowledge base/gitlab.md b/knowledge base/gitlab.md index 886be5a..d9c14ab 100644 --- a/knowledge base/gitlab.md +++ b/knowledge base/gitlab.md @@ -13,6 +13,7 @@ 1. [Docker Machine](#docker-machine) 1. [Troubleshooting](#troubleshooting) 1. [Use access tokens to clone projects](#use-access-tokens-to-clone-projects) + 1. [Pipeline fails with error `You are not allowed to download code from this project`](#pipeline-fails-with-error-you-are-not-allowed-to-download-code-from-this-project) 1. [Further readings](#further-readings) 1. [Sources](#sources) @@ -444,6 +445,22 @@ Pitfalls: git clone "https://oauth2:${ACCESS_TOKEN}@somegitlab.com/vendor/package.git" ``` +### Pipeline fails with error `You are not allowed to download code from this project` + +Error message example: + +```txt +Getting source from Git repository 00:00 +Fetching changes with git depth set to 20... +Reinitialized existing Git repository in /builds/myProj/myRepo/.git/ +remote: You are not allowed to download code from this project. +fatal: unable to access 'https://gitlab.com/myProj/myRepo.git/': The requested URL returned error: 403 +``` + +Root cause: the user starting the pipeline does not have enough privileges to the repository. + +Solution: give that user _developer_ access or have somebody else with enough privileges run it. + ## Further readings - Gitlab's helm [chart]