Skip to content

Instantly share code, notes, and snippets.

@lightonphiri
Created September 29, 2016 10:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lightonphiri/efc08dda05b532f01fb35e168e802961 to your computer and use it in GitHub Desktop.
Save lightonphiri/efc08dda05b532f01fb35e168e802961 to your computer and use it in GitHub Desktop.
Creating Github and Bitbucket repositories via the terminal
# Creating new repositories via the terminal
## Github [1]
curl -u 'USERNAME' https://api.github.com/user/repos -d '{"name": "REPOSITORY-NAME", "description": "REPOSITORY DESCRIPTION", "private": true}'
## Bitbucket [2]
curl --user USERNAME https://api.bitbucket.org/1.0/repositories --data name='REPOSITORY-NAME' --data is_private='true'
## References
[1] https://developer.github.com/v3/repos/#create
[2] https://confluence.atlassian.com/bitbucket/repository-resource-423626331.html#repositoryResource-POSTanewrepository
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment