It's my understanding that to create a personal repository on the command line, using the GitHub v3 API, one can do this (replacing USERNAME and REPONAME appropriately):
curl -u 'USERNAME' https://api.github.com/user/repos -d '{"name":"REPONAME"}'
The user then enters their username and password, and GitHub will create a new empty repository at "github.com/USERNAME/REPONAME".
My question is, how do I create an organization-owned repository via command line? I tried replacing USERNAME with the organization's name, and it prompted me for the 'host password'. I own the organization so I entered my password but I got "Bad credentials". Does this method not work for organization-owned repositories? Or am I doing something wrong?