nathansamson / docl Goto Github PK
View Code? Open in Web Editor NEWDigitalOcean Command Line Client (Please use official doctl client)
License: MIT License
DigitalOcean Command Line Client (Please use official doctl client)
License: MIT License
Frequently I encounter following error (possibly due to bad network latency). Is it possible to have a retry option or maybe increase network timeout limit ?
Error details :
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:878:in `initialize': execution expired (Faraday::ConnectionFailed)
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:878:in `open'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:878:in `block in connect'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:877:in `connect'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:851:in `start'
from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/net/http.rb:1367:in `request'
from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:82:in `perform_request'
from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:40:in `block in call'
from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:87:in `with_net_http_connection'
from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/adapter/net_http.rb:32:in `call'
from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/rack_builder.rb:139:in `build_response'
from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/connection.rb:377:in `run_request'
from /Library/Ruby/Gems/2.0.0/gems/faraday-0.9.1/lib/faraday/connection.rb:140:in `delete'
from /Library/Ruby/Gems/2.0.0/gems/barge-0.11.0/lib/barge/resource/base.rb:22:in `public_send'
from /Library/Ruby/Gems/2.0.0/gems/barge-0.11.0/lib/barge/resource/base.rb:22:in `request'
from /Library/Ruby/Gems/2.0.0/gems/barge-0.11.0/lib/barge/resource/base.rb:16:in `block (2 levels) in <module:Base>'
from /Library/Ruby/Gems/2.0.0/gems/barge-0.11.0/lib/barge/resource/droplet.rb:31:in `destroy'
from /Library/Ruby/Gems/2.0.0/gems/docl-0.0.5/lib/docl/cli.rb:137:in `destroy'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Library/Ruby/Gems/2.0.0/gems/docl-0.0.5/bin/docl:5:in `<top (required)>'
from /usr/bin/docl:23:in `load'
from /usr/bin/docl:23:in `<main>'
I can't seem to get docl
working now that I've upgraded:
$ docl authorize
You'll need to enter your DigitalOcean Private Access Token.
To be able to create / modify droplets, it needs to be read / write.
You can create a token on the DO website vite the Apps & API menu.
Enter your DO Token: 58f6412345[redacted]
$ docl regions
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Unable to authenticate you.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
I've tried with tokens from two different accounts that I know are working (tugboat
is happy with them, for example).
Hey,
Whenever i use any docl commands, i am getting a lot of JSON parse errors.
docl keys
~/.rvm/rubies/ruby-2.1.2/lib/ruby/2.1.0/json/common.rb:155:in `parse': 399: unexpected token at '{ (Faraday::ParsingError)
I have tried uninstall and reinstalling.
I keep seeing this more and more often... seems sporadic, but it'd be nice to nail this down.
$ docl create foobar coreos-stable 4GB nyc3 --key=~$SSH_ID --private-networking --user-data=../coreos/user-data --wait
/Library/Ruby/Gems/2.0.0/gems/docl-0.0.4/lib/docl/cli.rb:124:in `create': undefined method `networks' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in `run'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in `invoke_command'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
from /Library/Ruby/Gems/2.0.0/gems/docl-0.0.4/bin/docl:5:in `<top (required)>'
from /usr/bin/docl:23:in `load'
from /usr/bin/docl:23:in `<main>'
I have just installed docl on my Mac Air, running OS X 10.10.1 (Yosemite). I am running ruby 2.0.0p48.
When I initially installed docl, and ran 'docl authorize' I was able to complete that command successful. Also, 'docl help' works.
But other commands do not:
$ docl keys
/Library/Ruby/Gems/2.0.0/gems/docl-0.0.4/lib/docl/cli.rb:47:in keys': undefined method
each' for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
start'
from /Library/Ruby/Gems/2.0.0/gems/docl-0.0.4/bin/docl:5:in <top (required)>' from /usr/bin/docl:23:in
load'
from /usr/bin/docl:23:in `
$ docl regions
/Library/Ruby/Gems/2.0.0/gems/docl-0.0.4/lib/docl/cli.rb:59:in regions': private method
select' called for nil:NilClass (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:in
invoke_command'
from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor.rb:359:in dispatch' from /Library/Ruby/Gems/2.0.0/gems/thor-0.19.1/lib/thor/base.rb:440:in
start'
from /Library/Ruby/Gems/2.0.0/gems/docl-0.0.4/bin/docl:5:in <top (required)>' from /usr/bin/docl:23:in
load'
from /usr/bin/docl:23:in `
Please advise.
Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.