diff options
author | Achilleas Pipinellis <axil@gitlab.com> | 2019-09-02 13:42:36 +0000 |
---|---|---|
committer | Achilleas Pipinellis <axil@gitlab.com> | 2019-09-02 13:42:36 +0000 |
commit | 1a060f7dca85cf5bb9950f3ce944f0b5a287ac2a (patch) | |
tree | e6a48b17a44f7122a720a9c0b9e02f5851fd5c71 | |
parent | 12936a8d21e6dfc0c2ca773231650303dc1ed1e7 (diff) | |
parent | c1000b7948e1817fbc2661dac172a0560054a1c3 (diff) | |
download | gitlab-ce-1a060f7dca85cf5bb9950f3ce944f0b5a287ac2a.tar.gz |
Merge branch 'docs-maven-repo-cli-credentials' into 'master'
Added example for passing Maven repo credentials
Closes gitlab-ee#6711
See merge request gitlab-org/gitlab-ce!32073
-rw-r--r-- | doc/user/application_security/sast/index.md | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/user/application_security/sast/index.md b/doc/user/application_security/sast/index.md index 3eead6ccd3f..5e7bc4142fb 100644 --- a/doc/user/application_security/sast/index.md +++ b/doc/user/application_security/sast/index.md @@ -125,6 +125,21 @@ variables: Because the template is [evaluated before](../../../ci/yaml/README.md#include) the pipeline configuration, the last mention of the variable will take precedence. +#### Using a variable to pass username and password to a private Maven repository + +If you have a private Apache Maven repository that requires login credentials, +you can use the `MAVEN_CLI_OPTS` [environment variable](#available-variables) +to pass a username and password. You can set it under your project's settings +so that your credentials aren't exposed in `.gitlab-ci.yml`. + +If the username is `myuser` and the password is `verysecret` then you would +set the following [variable](../../../ci/variables/README.md#via-the-ui) +under your project's settings: + +| Type | Key | Value | +| ---- | --- | ----- | +| Variable | `MAVEN_CLI_OPTS` | `-Drepository.password=verysecret -Drepository.user=myuser` | + ### Overriding the SAST template If you want to override the job definition (for example, change properties like |