Skip to content
Snippets Groups Projects
Commit 23665d25 authored by Job van der Voort's avatar Job van der Voort
Browse files

add loop to deploy key to multiple projects

parent f0a4f62c
No related branches found
No related tags found
1 merge request!6949gitlab.com issue #229 - no_avatar.png path in coffee
Loading
Loading
@@ -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
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment