Skip to content

Instantly share code, notes, and snippets.

@jeanlaurent
Created June 10, 2010 09:46
Show Gist options
  • Save jeanlaurent/432775 to your computer and use it in GitHub Desktop.
Save jeanlaurent/432775 to your computer and use it in GitHub Desktop.
#!/bin/bash
login=$1
password=$2
repository=$3
command=curl
#command=echo
#Create a private repository in github
#Assign all usersname in githubusers.txt file to this repository.
$command 'https://'${login}':'${password}'@github.com/api/v2/yaml/repos/create?name='${repository}'&public=0'
for i in `cat githubusers.txt`; do
$command 'https://'${login}':'${password}'@github.com/api/v2/yaml/repos/collaborators/'${repository}'/add/'${i}''
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment