Commit 3f535e69 authored by Nick Gaskill's avatar Nick Gaskill

Merge branch 'trizzi-master-patch-78635' into 'master'

Deploy tokens cannot be used with the Packages API

See merge request gitlab-org/gitlab!61943
parents 2118f567 b3cd3a02
......@@ -69,22 +69,6 @@ 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.
......
......@@ -130,20 +130,12 @@ 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:
Example request publishing a NuGet 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:
nuget source Add -Name GitLab -Source "https://gitlab.example.com/api/v4/projects/10/packages/nuget/index.json" -UserName deploy-token-username -Password 12345678asdf
```json
{
"message":"201 Created"
}
nuget push mypkg.nupkg -Source GitLab
```
### Push or upload packages
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment