Ubuntu version: 14.04.5 LTS.

gdrive is a command line utility for interacting with Google Drive.

I have initialized gdrive (https://github.com/prasmussen/gdrive) with a specific user. As example gdrive about returns its information.

The way I install 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:
Enter verification code:

gdrive about
User: userName userSurname, <e-mail@gmail.com>
Used: 6.5 GB
Free: 9.6 GB
Total: 16.1 GB
Max upload size: 5.2 TB

I want to reinitialize/re-authentication gdrive again with a completely new user email address.

[Q] Is there any way to change the user's information with another email address?

If I remove gdrive and re-install it, could it be a solution?

  • Please see my updated question @pomsky – alper Apr 3 '18 at 15:32
  • 2
    Thanks for updating with more info. Hopefully someone will be able to help you. BTW your edit suggestion to another related answer is wrong (grive should not be gdrive there) and hence declined. There is no package named gdrive in that PPA, but there are packages named grive & grive2. – pomsky Apr 3 '18 at 15:37

gdrive help about will output:

Google drive metadata, quota usage
gdrive [global] about [options]

  -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)

  --bytes   Show size in bytes

The easiest way to clean authentication data is to rm -rf ~/.gdrive.

| improve this answer | |
  • gdrive help about shows Application path, default: .gdrive. Is this normal? @Ping Chu Hung – alper Apr 10 '18 at 7:41
  • In my case, .gdrive is under home directory. At which directory did you execute gdrive help about? Is .gdrive directory also under home directory? – Ping Chu Hung Apr 10 '18 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.