Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error creating repository - network or config error? #45

Open
kristianmandrup opened this issue Apr 5, 2010 · 1 comment
Open

Error creating repository - network or config error? #45

kristianmandrup opened this issue Apr 5, 2010 · 1 comment

Comments

@kristianmandrup
Copy link

module Github
  class Repo < Thor
    include Octopi

    desc "create NAME", "create a new public repository"
    method_option :description,      :type => :string
    method_option :homepage,         :type => :string
    method_option :private,          :type => :boolean
    def create(name)           
      authenticated do
        repo_options = {:name => name}
        [:description, :homepage ].each{|o| repo_options[o] = options[o] if options[o]}
        repo_options[:public] = 0 if options[:private]                
      
        Repository.create(repo_options)               
      end
    end
...
end

Running thor task

kristian-mandrups-macbook-pro:lib kristianconsult$ thor github:repo:create cool_stuff
W, [2010-04-05T15:18:50.956361 #15333]  WARN -- : Using in memory store
I, [2010-04-05T15:18:57.762911 #15333]  INFO -- : Failed to fetch from API - Exception: APICache::TimeoutError: Timed out when calling API (timeout 5s)
W, [2010-04-05T15:18:57.763000 #15333]  WARN -- : Data not available in the cache or from API for key 
/Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/api_cache-0.2.0/lib/api_cache/api.rb:47:in `rescue in get': Timed out when calling API (timeout 5s) (APICache::TimeoutError)
    from /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/api_cache-0.2.0/lib/api_cache/api.rb:35:in `get'
    from /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/api_cache-0.2.0/lib/api_cache.rb:107:in `get'
    from /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/octopi-0.2.8/lib/octopi/api.rb:178:in `submit'
    from /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/octopi-0.2.8/lib/octopi/api.rb:142:in `post'
    from /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/octopi-0.2.8/lib/octopi/repository.rb:118:in `create'
    from /Users/kristianconsult/Development/Languages/Ruby/Apps/Task-apps/Thor-tasks/github_tasks/lib/github.thor:17:in `block in create'
    from /Users/kristianconsult/.rvm/gems/ruby-1.9.1-p378/gems/octopi-0.2.8/lib/octopi.rb:33:in `block in authenticated'
@kristianmandrup
Copy link
Author

Turned out it was due to a DNS configuration error...

On another note, it seems like the repository API doesn't yet support forking a repository!?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant