summaryrefslogtreecommitdiff
path: root/doc/user/application_security/index.md
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 18:09:37 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-04-06 18:09:37 +0000
commit495c22d1245b6212b21b7379a542df73dfa77206 (patch)
tree5f0f82dd6c8c4fe1c4bd411f9e398b1a6eaaa69f /doc/user/application_security/index.md
parentf3b1e07903a7f509b11ad7cf188fac46d98f77f6 (diff)
downloadgitlab-ce-495c22d1245b6212b21b7379a542df73dfa77206.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'doc/user/application_security/index.md')
-rw-r--r--doc/user/application_security/index.md29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/user/application_security/index.md b/doc/user/application_security/index.md
index 299507ff6c4..dadff8583db 100644
--- a/doc/user/application_security/index.md
+++ b/doc/user/application_security/index.md
@@ -251,6 +251,35 @@ environment.
Read how to [operate the Secure scanners in an offline environment](offline_deployments/index.md).
+## Using private Maven repos
+
+If you have a private Apache Maven repository that requires login credentials,
+you can use the `MAVEN_CLI_OPTS` environment variable
+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` | `--settings mysettings.xml -Drepository.password=verysecret -Drepository.user=myuser` |
+
+```xml
+<!-- mysettings.xml -->
+<settings>
+ ...
+ <servers>
+ <server>
+ <id>private_server</id>
+ <username>${private.username}</username>
+ <password>${private.password}</password>
+ </server>
+ </servers>
+</settings>
+```
+
## Outdated security reports
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/4913) in GitLab 12.7.