diff options
author | Job van der Voort <jobvandervoort@gmail.com> | 2014-05-05 17:04:19 +0200 |
---|---|---|
committer | Job van der Voort <jobvandervoort@gmail.com> | 2014-05-05 17:04:19 +0200 |
commit | 23665d2506cfb0d7d30c368f4d82699587b9f86b (patch) | |
tree | 6c7021567666e97359caf7822b6f3105f6d6966a /doc/api | |
parent | f0a4f62c7eb0900ca1c3cdecffbacc46a72480d2 (diff) | |
download | gitlab-ce-23665d2506cfb0d7d30c368f4d82699587b9f86b.tar.gz |
add loop to deploy key to multiple projects
Diffstat (limited to 'doc/api')
-rw-r--r-- | doc/api/deploy_key_multiple_projects.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/doc/api/deploy_key_multiple_projects.md b/doc/api/deploy_key_multiple_projects.md index 56d8d513946..f4121a718e6 100644 --- a/doc/api/deploy_key_multiple_projects.md +++ b/doc/api/deploy_key_multiple_projects.md @@ -18,5 +18,7 @@ curl https://gitlab.com/api/v3/groups/1234?private_token=abcdef # where the id o With those IDs, add the same deploy key to all: ``` -curl -X POST curl https://gitlab.com/api/v3/projects/321/deploy_key_here?private_token=abcdef +for project_id in 321 456 987; do + curl -X POST --data '{"title": "my key", "key": "ssh-rsa AAAA..."}' --header 'PRIVATE-TOKEN: abcdef' https://gitlab.com/api/v3/projects/${project_id}/keys +done ``` |