 }).login ["user", "repo", "gist"], (err, id, token) ->
   if err or not token
     throw new Error("Cannot connect to GitHub")
+  console.log "github auth token was set"  
   nconf.set "GIHUB_ADMIN_TOKEN", token  
 
+
+ghRepos = ->
+  githubApi.authenticate {type: "oauth", token: nconf.get("GIHUB_ADMIN_TOKEN")}
+  githubApi.repos
 
 
 createRepo = (repo, username, callback) ->

getCommunities = (callback) ->
  rc.hgetall "communities", (err, hash) ->
    if err or not hash or Object.keys(hash) == 0
      ghRepos.getFromOrg {org: "communities"}, (err, repos) ->
        if err
          callback err
          return

gitty   = require "gitty"

GitHubApi = require "github"
githubApi = new GitHubApi({version: "3.0.0"})


redis = require "redis"
