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
7f7617cb
Commit
7f7617cb
authored
Mar 11, 2021
by
Tim Rizzi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add example requests for publishing packages
parent
0f600368
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
33 additions
and
1 deletion
+33
-1
doc/user/packages/generic_packages/index.md
doc/user/packages/generic_packages/index.md
+17
-1
doc/user/project/deploy_tokens/index.md
doc/user/project/deploy_tokens/index.md
+16
-0
No files found.
doc/user/packages/generic_packages/index.md
View file @
7f7617cb
...
...
@@ -53,7 +53,7 @@ PUT /projects/:id/packages/generic/:package_name/:package_version/:file_name?sta
Provide the file context in the request body.
Example request:
Example request
using a personal access token
:
```
shell
curl
--header
"PRIVATE-TOKEN: <your_access_token>"
\
...
...
@@ -69,6 +69,22 @@ Example response:
}
```
Example request using a deploy token:
```
shell
curl
--header
"DEPLOY-TOKEN: <deploy_token>"
\
--upload-file
path/to/file.txt
\
"https://gitlab.example.com/api/v4/projects/24/packages/generic/my_package/0.0.1/file.txt?status=hidden"
```
Example response:
```
json
{
"message"
:
"201 Created"
}
```
## Download package file
Download a package file.
...
...
doc/user/project/deploy_tokens/index.md
View file @
7f7617cb
...
...
@@ -130,6 +130,22 @@ To pull packages in the GitLab package registry, you must:
1.
For the
[
package type of your choice
](
../../packages/index.md
)
, follow the
authentication instructions for deploy tokens.
Example request publishing a generic package using a deploy token:
```
shell
curl
--header
"DEPLOY-TOKEN: <deploy_token>"
\
--upload-file
path/to/file.txt
\
"https://gitlab.example.com/api/v4/projects/24/packages/generic/my_package/0.0.1/file.txt?status=hidden"
```
Example response:
```
json
{
"message"
:
"201 Created"
}
```
### Push or upload packages
> [Introduced](https://gitlab.com/gitlab-org/gitlab/-/issues/213566) in GitLab 13.0.
...
...
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