twitter / twurl

OAuth-enabled curl for the Twitter API
https://developer.twitter.com
MIT License
1.8k stars 301 forks source link

No such file or direcotry #113

Closed timurozheghin closed 5 years ago

timurozheghin commented 5 years ago

twurl 0.9.3

$ twurl authorize --consumer-key "..." --consumer-secret "..." --access-token "..." --token-secret "..."

results in Go to https://api.twitter.com/oauth/authorize?oauth_consumer_key=...&oauth_nonce=UbUTvUeTdN73bnjNmO2o6EXv8Q4CwPfIEe1x5Ps&oauth_signature=PkkvmDaahaNwqaPtxifIzcmDqng%253D&oauth_signature_method=HMAC-SHA1&oauth_timestamp=1551292631&oauth_token=QqAxOQAAAAAA9g3sAAABaTA_CNQ&oauth_version=1.0 and paste in the supplied PIN

but then fails

Traceback (most recent call last):
    8: from /home/user/.rbenv/versions/2.6.1/bin/twurl:23:in `<main>'
    7: from /home/user/.rbenv/versions/2.6.1/bin/twurl:23:in `load'
    6: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/bin/twurl:4:in `<top (required)>'
    5: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/cli.rb:21:in `run'
    4: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/cli.rb:38:in `dispatch'
    3: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/abstract_command_controller.rb:7:in `dispatch'
    2: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/authorization_controller.rb:6:in `dispatch'
    1: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/oauth_client.rb:123:in `exchange_credentials_for_access_token'
/home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/oauth-0.5.4/lib/oauth/consumer.rb:236:in `token_request': 403 Forbidden (OAuth::Unauthorized)
    11: from /home/user/.rbenv/versions/2.6.1/bin/twurl:23:in `<main>'
    10: from /home/user/.rbenv/versions/2.6.1/bin/twurl:23:in `load'
     9: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/bin/twurl:4:in `<top (required)>'
     8: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/cli.rb:21:in `run'
     7: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/cli.rb:38:in `dispatch'
     6: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/abstract_command_controller.rb:7:in `dispatch'
     5: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/authorization_controller.rb:6:in `dispatch'
     4: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/oauth_client.rb:122:in `exchange_credentials_for_access_token'
     3: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/oauth_client.rb:125:in `rescue in exchange_credentials_for_access_token'
     2: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/oauth_client.rb:138:in `perform_pin_authorize_workflow'
     1: from /home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/oauth_client.rb:138:in `gets'
/home/user/.rbenv/versions/2.6.1/lib/ruby/gems/2.6.0/gems/twurl-0.9.3/lib/twurl/oauth_client.rb:138:in `gets': No such file or directory @ rb_sysopen - <token_here> (Errno::ENOENT)

How can i handle this?

smaeda-ks commented 5 years ago

duplicate: https://github.com/twitter/twurl/pull/111 https://twittercommunity.com/t/twurl-fails-to-auth/122289

andypiper commented 5 years ago

Closing as duplicate of #95 and resolution in #111

/cc @dlamacchia

animanoir commented 3 years ago

Just in case someone gets here also, I solved my problem not using Git Bash. It seems sometimes using some terminals things won´t work.