Commit 6a6968bb authored by Jonston Chan's avatar Jonston Chan Committed by Marcel Amirault

Quote URLs in cURL command

parent 580148e7
...@@ -10,4 +10,4 @@ link: https://docs.gitlab.com/ee/development/documentation/restful_api_styleguid ...@@ -10,4 +10,4 @@ link: https://docs.gitlab.com/ee/development/documentation/restful_api_styleguid
level: error level: error
scope: code scope: code
raw: raw:
- 'curl.*[^"=]https?://.*' - 'curl [^"]+://.*'
...@@ -38,14 +38,14 @@ GET projects/:id/packages/helm/:channel/index.yaml ...@@ -38,14 +38,14 @@ GET projects/:id/packages/helm/:channel/index.yaml
```shell ```shell
curl --user <username>:<personal_access_token> \ curl --user <username>:<personal_access_token> \
https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/index.yaml "https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/index.yaml"
``` ```
Write the output to a file: Write the output to a file:
```shell ```shell
curl --user <username>:<personal_access_token> \ curl --user <username>:<personal_access_token> \
https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/index.yaml \ "https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/index.yaml" \
--remote-name --remote-name
``` ```
...@@ -67,7 +67,7 @@ GET projects/:id/packages/helm/:channel/charts/:file_name.tgz ...@@ -67,7 +67,7 @@ GET projects/:id/packages/helm/:channel/charts/:file_name.tgz
```shell ```shell
curl --user <username>:<personal_access_token> \ curl --user <username>:<personal_access_token> \
https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/charts/mychart.tgz \ "https://gitlab.example.com/api/v4/projects/1/packages/helm/stable/charts/mychart.tgz" \
--remote-name --remote-name
``` ```
...@@ -91,5 +91,5 @@ POST projects/:id/packages/helm/api/:channel/charts ...@@ -91,5 +91,5 @@ POST projects/:id/packages/helm/api/:channel/charts
curl --request POST \ curl --request POST \
--form 'chart=@mychart.tgz' \ --form 'chart=@mychart.tgz' \
--user <username>:<personal_access_token> \ --user <username>:<personal_access_token> \
https://gitlab.example.com/api/v4/projects/1/packages/helm/api/stable/charts "https://gitlab.example.com/api/v4/projects/1/packages/helm/api/stable/charts"
``` ```
...@@ -725,7 +725,7 @@ Example request: ...@@ -725,7 +725,7 @@ Example request:
```shell ```shell
curl --request POST \ curl --request POST \
--url http://localhost:3000/api/v4/namespaces/123/minutes \ --url "http://localhost:3000/api/v4/namespaces/123/minutes" \
--header 'Content-Type: application/json' \ --header 'Content-Type: application/json' \
--header 'PRIVATE-TOKEN: <admin access token>' \ --header 'PRIVATE-TOKEN: <admin access token>' \
--data '{ --data '{
...@@ -769,7 +769,7 @@ Example request: ...@@ -769,7 +769,7 @@ Example request:
```shell ```shell
curl --request PATCH \ curl --request PATCH \
--url http://localhost:3000/api/v4/namespaces/123/minutes/move/321 \ --url "http://localhost:3000/api/v4/namespaces/123/minutes/move/321" \
--header 'PRIVATE-TOKEN: <admin access token>' --header 'PRIVATE-TOKEN: <admin access token>'
``` ```
......
...@@ -125,7 +125,7 @@ Example request that uses HTTP Basic authentication: ...@@ -125,7 +125,7 @@ Example request that uses HTTP Basic authentication:
```shell ```shell
curl --user "user:<your_access_token>" \ curl --user "user:<your_access_token>" \
https://gitlab.example.com/api/v4/projects/24/packages/generic/my_package/0.0.1/file.txt "https://gitlab.example.com/api/v4/projects/24/packages/generic/my_package/0.0.1/file.txt"
``` ```
## Publish a generic package by using CI/CD ## Publish a generic package by using CI/CD
......
...@@ -392,9 +392,9 @@ upload: ...@@ -392,9 +392,9 @@ upload:
- if: $CI_COMMIT_TAG - if: $CI_COMMIT_TAG
script: script:
- | - |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/${DARWIN_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}/${DARWIN_AMD64_BINARY} curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/${DARWIN_AMD64_BINARY} "${PACKAGE_REGISTRY_URL}/${DARWIN_AMD64_BINARY}"
- | - |
curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/${LINUX_AMD64_BINARY} ${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY} curl --header "JOB-TOKEN: ${CI_JOB_TOKEN}" --upload-file bin/${LINUX_AMD64_BINARY} "${PACKAGE_REGISTRY_URL}/${LINUX_AMD64_BINARY}"
release: release:
# Caution, as of 2021-02-02 these assets links require a login, see: # Caution, as of 2021-02-02 these assets links require a login, see:
......
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