Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
e83eb49f
Commit
e83eb49f
authored
Sep 17, 2018
by
Achilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copyedit Maven docs for CI_JOB_TOKEN support
parent
73cc6c4a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
45 deletions
+49
-45
doc/user/project/packages/maven.md
doc/user/project/packages/maven.md
+49
-45
No files found.
doc/user/project/packages/maven.md
View file @
e83eb49f
...
@@ -28,59 +28,63 @@ repository.
...
@@ -28,59 +28,63 @@ repository.
If a project is private or you want to upload Maven artifacts to GitLab,
If a project is private or you want to upload Maven artifacts to GitLab,
credentials will need to be provided for authorization. Support is available for
credentials will need to be provided for authorization. Support is available for
[
personal access tokens
](
../../profile/personal_access_tokens.md
)
and
[
personal access tokens
](
#authenticating-with-a-personal-access-token
)
and
[
CI job tokens
](
https://docs.gitlab.com/ee/ci/variables/#predefined-variables-environment-variables
)
.
[
CI job tokens
](
##authenticating-with-a-ci-job-token
)
.
### Authenticating with a
Personal Access T
oken
### Authenticating with a
personal access t
oken
To authenticate with a Personal Access Token, add a corresponding section to your
To authenticate with a
[
personal access token
](
../../profile/personal_access_tokens.md
)
,
[
`settings.xml`
](
https://maven.apache.org/settings.html
)
file:
add a corresponding section to your
[
`settings.xml`
](
https://maven.apache.org/settings.html
)
file:
```
xml
<settings>
<servers>
<server>
<id>
gitlab-maven
</id>
<configuration>
<httpHeaders>
<property>
<name>
Private-Token
</name>
<value>
REPLACE_WITH_YOUR_PERSONAL_ACCESS_TOKEN
</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
```
```xml
<settings>
<servers>
<server>
<id>gitlab-maven</id>
<configuration>
<httpHeaders>
<property>
<name>Private-Token</name>
<value>REPLACE_WITH_YOUR_PERSONAL_ACCESS_TOKEN</value>
</property>
</httpHeaders>
</configuration>
</server>
</servers>
</settings>
```
You should now be able to upload Maven artifacts to your project.
You should now be able to upload Maven artifacts to your project.
### Authenticating with a CI job token
### Authenticating with a CI Job Token
If you're using Maven with GitLab CI/CD, a CI job token can be used instead
of a personal access token.
To authenticate with a CI
Job T
oken, add a corresponding section to your
To authenticate with a CI
job t
oken, add a corresponding section to your
[
`settings.xml`
](
https://maven.apache.org/settings.html
)
file:
[
`settings.xml`
](
https://maven.apache.org/settings.html
)
file:
```xml
```
xml
<settings>
<settings>
<servers>
<servers>
<server>
<server>
<id>gitlab-maven</id>
<id>
gitlab-maven
</id>
<configuration>
<configuration>
<httpHeaders>
<httpHeaders>
<property>
<property>
<name>Job-Token</name>
<name>
Job-Token
</name>
<value>REPLACE_WITH_YOUR_CI_JOB_TOKEN</value>
<value>
CI_JOB_TOKEN
</value>
</property>
</property>
</httpHeaders>
</httpHeaders>
</configuration>
</configuration>
</server>
</server>
</servers>
</servers>
</settings>
</settings>
```
```
You should now be able to upload Maven artifacts to your project.
You can read more on
[
how to create Maven packages using GitLab CI/CD
](
#creating-maven-packages-with-gitlab-ci-cd
)
.
## Configuring your project to use the GitLab Maven repository URL
## Configuring your project to use the GitLab Maven repository URL
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment