Skip to content

Instantly share code, notes, and snippets.

@indirect
Created July 30, 2010 23:41
Show Gist options
  • Save indirect/501505 to your computer and use it in GitHub Desktop.
Save indirect/501505 to your computer and use it in GitHub Desktop.
create a github repo from ruby
github_user = "indirect"
github_token = "sekrit"
def make_repo(repo_name)
Net::HTTP.post_form URI.parse('http://github.com/repositories'),
'login' => github_user,
'token' => github_token,
'repository[name]' => repo_name
end
make_repo("my_cool_project")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment