Failed to get about: googleapi: Error 401: Invalid Credentials, authError

Asked

Viewed 151 times

0

I’m using a generic Linux application from Google Drive, which aims to Upload local folders to Google Drive via Shell Script.

However, when trying to run command on the Debian terminal:

./gdrive about

the application returns me the following error:

Failed to get about: googleapi: Error 401: Invalid Credentials, authError

inserir a descrição da imagem aqui

Has anyone here ever used this application and/or would you know what the possible problem is? (Remembering that I already cleared the system cache, reinstalled the application, but does not solve)

Application link on Github: https://github.com/prasmussen/gdrive/

I’m using this version. inserir a descrição da imagem aqui

  • 1

    Apparently this question is outside the scope of the site, more responding, how do you expect to upload without authenticating in Drive? In the project description there is the section talking about Service Account.

  • Thanks. I managed to solve in a simple way. See my answer below! :)

1 answer

0


I solved the problem. Basically, the software stores a Google Drive Authentication key in the . json file in the directory

/home/.gdrive/
/home/.gdrive/file_cache.json
/home/.gdrive/token_v2.json

and whenever we request a new ./gdrive, the software checks if this file exists. The problem is that this file is hidden.

What did I do? I executed the command:

locate gdrive

inserir a descrição da imagem aqui

and I found all the occurrences of the name in my system. Then I do:

locate gdrive | xargs rm

to delete all possible occurrences of gdrive on the server.

So, I do the new download:

wget https://docs.google.com/uc?id=0B3X9GlR6EmbnQ0FtZmJJUXEyRTA&export=download

mv ucid0B3X9GlR6EmbnQ0FtZmJJUXEyRTAexpordownload gdrive

and then :

./gdrive about

inserir a descrição da imagem aqui

Everything works perfect in this method

Browser other questions tagged

You are not signed in. Login or sign up in order to post.