Ubuntu 版本:14.04.5 LTS
。
gdrive 是一个用于与 Google Drive 交互的命令行实用程序。
我已经初始化gdrive
(https://github.com/prasmussen/gdrive) 与特定用户。例如gdrive about
返回其信息。
我的安装方式gdrive
:
$ go get github.com/prasmussen/gdrive
$ gopath=$(go env | grep 'GOPATH' | cut -d "=" -f 2 | tr -d '"')
$ echo 'export PATH=$PATH:$gopath/bin' >> ~/.profile
$ source .profile
$ gdrive about # This line authenticates the user only once on the same node.
Authentication needed
Go to the following url in your browser:
https://accounts.google.com/o/oauth2/auth?access_type=offline&client_id=...e=state
Enter verification code:
gdrive about
User: userName userSurname, <[email protected]>
Used: 6.5 GB
Free: 9.6 GB
Total: 16.1 GB
Max upload size: 5.2 TB
我想gdrive
使用全新的用户电子邮件地址重新初始化/重新验证。
[问]有没有办法用另一个电子邮件地址更改用户的信息?
如果我删除gdrive
并重新安装它,可以解决问题吗?
答案1
gdrive help about
将输出:
Google drive metadata, quota usage
gdrive [global] about [options]
global:
-c, --config <configDir> Application path, default: /home/banyhong/.gdrive
--refresh-token <refreshToken> Oauth refresh token used to get access token (for advanced users)
--access-token <accessToken> Oauth access token, only recommended for short-lived requests because of short lifetime (for advanced users)
options:
--bytes Show size in bytes
清除身份验证数据的最简单方法是rm -rf ~/.gdrive
。
答案2
我找到了一种最简单的方法来注销当前登录 G-Drive Cli 的用户
rm -rf ~/.gdrive/token_*.json