Skip to content

Add support for GitLab dependency proxy

Hello, I wanted to do my first contribution to GitLab.

Currently, I get a 403 when trying to pull from the dependency proxy. The authentication is not done for AutoDevOps project as we do for the standard CI/CD pipeline, according to the documentation.

So, I suggest to add theses lines of code in src/build.sh to do the authentication when the dependency proxy is enabled:

if [[ -n "$CI_DEPENDENCY_PROXY_SERVER" && -n "$CI_DEPENDENCY_PROXY_USER" ]]; then
  echo "Logging to GitLab Dependency proxy with CI credentials..."
  echo "$CI_DEPENDENCY_PROXY_PASSWORD" | docker login -u "$CI_DEPENDENCY_PROXY_USER" --password-stdin "$CI_DEPENDENCY_PROXY_SERVER"
fi