使用GDriveFS挂载Google Drive出现SSL错误解决

安装正常流程操作,然后获取到Google Drive的授权码,使用命令填入授权码

gdfstool auth -a /var/cache/gdfs.creds "你的授权码"

出现如下错误

Traceback (most recent call last):
  File "/usr/bin/gdfstool", line 125, in <module>
    main()
  File "/usr/bin/gdfstool", line 118, in main
    _handle_auth(args)
  File "/usr/bin/gdfstool", line 56, in _handle_auth
    _handle_auth_store(*args.auth)
  File "/usr/bin/gdfstool", line 50, in _handle_auth_store
    authorize.step2_doexchange(authcode)
  File "/usr/lib/python2.7/site-packages/gdrivefs/gdtool/oauth_authorize.py", line 143, in step2_doexchange
    raise AuthorizationFailureError(message)
gdrivefs.errors.AuthorizationFailureError: Could not do auth-exchange (this was either a legitimate error, or the auth-exchange was attempted when not necessary): [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:579)

使用命令查询 pip 列表各版本

pip list

查询可知 httplib2 版本为 0.8,使用命令升级 httplib2

pip install --upgrade httplib2

再次填入授权码命令即可,成功输出如下

Authorization code recorded.

授权码好像有一定时效,过期将输出如下错误

Traceback (most recent call last):
  File "/usr/bin/gdfstool", line 125, in <module>
    main()
  File "/usr/bin/gdfstool", line 118, in main
    _handle_auth(args)
  File "/usr/bin/gdfstool", line 56, in _handle_auth
    _handle_auth_store(*args.auth)
  File "/usr/bin/gdfstool", line 50, in _handle_auth_store
    authorize.step2_doexchange(authcode)
  File "/usr/lib/python2.7/site-packages/gdrivefs/gdtool/oauth_authorize.py", line 143, in step2_doexchange
    raise AuthorizationFailureError(message)
gdrivefs.errors.AuthorizationFailureError: Could not do auth-exchange (this was either a legitimate error, or the auth-exchange was attempted when not necessary): invalid_grant

遇到如上情况,重新输入如下命令认真Google Drive接口授权认证即可

gdfstool auth -u
暂无评论

发送评论 编辑评论


				
|´・ω・)ノ
ヾ(≧∇≦*)ゝ
(☆ω☆)
(╯‵□′)╯︵┴─┴
 ̄﹃ ̄
(/ω\)
∠( ᐛ 」∠)_
(๑•̀ㅁ•́ฅ)
→_→
୧(๑•̀⌄•́๑)૭
٩(ˊᗜˋ*)و
(ノ°ο°)ノ
(´இ皿இ`)
⌇●﹏●⌇
(ฅ´ω`ฅ)
(╯°A°)╯︵○○○
φ( ̄∇ ̄o)
ヾ(´・ ・`。)ノ"
( ง ᵒ̌皿ᵒ̌)ง⁼³₌₃
(ó﹏ò。)
Σ(っ °Д °;)っ
( ,,´・ω・)ノ"(´っω・`。)
╮(╯▽╰)╭
o(*////▽////*)q
>﹏<
( ๑´•ω•) "(ㆆᴗㆆ)
😂
😀
😅
😊
🙂
🙃
😌
😍
😘
😜
😝
😏
😒
🙄
😳
😡
😔
😫
😱
😭
💩
👻
🙌
🖕
👍
👫
👬
👭
🌚
🌝
🙈
💊
😶
🙏
🍦
🍉
😣
Source: github.com/k4yt3x/flowerhd
颜文字
Emoji
小恐龙
花!
上一篇
下一篇