Skip to content

Instantly share code, notes, and snippets.

@jbarber
Last active February 18, 2016 10:30
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 jbarber/9e997757653a46275440 to your computer and use it in GitHub Desktop.
Save jbarber/9e997757653a46275440 to your computer and use it in GitHub Desktop.
List all repos for an organisation
require 'octokit'
# ~/.netrc contains:
# machine api.github.com
# login jonathan.barber@gmail.com
# password $GITHUBAPIKEY
Octokit.auto_paginate = true
client = Octokit::Client.new(:netrc => true)
client.org_repos('rainforestapp', {:type => 'all'}).collect(&:ssh_url).join(' ')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment