prasmussen / gdrive

Google Drive CLI Client
MIT License
8.99k stars 1.19k forks source link

Sign in with Google temporarily disabled for this app [with solution] #525

Open mdobydullah opened 4 years ago

mdobydullah commented 4 years ago

Hi, I'm using gdrive to backup my CentOS 7's files for a long time. Gdrive is the best among all google drive backup tools. A few days ago, I've launched a new server (CentOS 8) and tried to setup gdrive. But Google shows "Sign in with Google temporarily disabled for this app".

error_sign_in

Please take a look and please resume the maintenance. We love this tool.

Update: I've written a way to fix the issue. Please check this article: Mount Google Drive using GDrive on Linux Server with Own OAuth Credentials.

I hope this method will work on all servers.

Thank you.

mmmarceleza commented 4 years ago

I had the same problem with a new server with Ubuntu 18.04. :(

huabin commented 4 years ago

I had the same issue with Debian 9

donand commented 4 years ago

Same problem with Ubuntu 18.04, any update?

mdobydullah commented 4 years ago

Hello Everyone,

I've written a way to fix the issue. Please check this article: Mount Google Drive using GDrive on Linux Server with Own OAuth Credentials.

I hope this method will work on all servers.

Thanks.

donand commented 4 years ago

In the end I solved it by using rclone https://github.com/rclone/rclone, the login procedure is working there.

mdobydullah commented 4 years ago

Hi @donand

Congrats. Rclone is a great alternative. Yesterday night, I've solved by compiling the GDrive project with my own OAuth credentials. Now it works fine. I'm using GDrive commands like before.

ianxm commented 4 years ago

I don't think this should be marked [Fixed]. Hard coding credentials is not secure. if someone copies your gdrive binary they'll have access to your account. Is this the recommended path? Will the root cause be fixed?

mdobydullah commented 4 years ago

Hi @ianxm,

GDrive is not being actively maintained at the moment. You should use the compiled gdrive only for you. For security reasons, you shouldn't share your compiled file with others.

ianxm commented 4 years ago

it was good of you to write up the steps to get it to work, but I don't think it's a good idea. It is a security risk even if you don't purposely share the file. It's uncommon to keep binaries around with credentials embedded in them. it would be easy to forget that file requires special handling. If you do this you might want to keep it in your ~/bin and chmod 700 it.

thanks for clarifying about the project. I didn't realize it was unmaintained. I'll use rclone.

mdobydullah commented 4 years ago

Hello @ianxm,

Thanks for your information. Yeah rclone, borg, odeke-em/drive are the great alternatives.

develooper1994 commented 4 years ago

I had same issue and this fix doesn't work. https://www.mynotepaper.com/mount-google-drive-using-gdrive-on-linux-server-with-own-oauth-credentials

mdobydullah commented 4 years ago

Hi @develooper1994, Please follow all the steps properly and check file permission. It works for me and also tested by more users.

cipri-tom commented 4 years ago

@donand have you managed to download a file with rclone which is not on your own drive ? gdrive had the id option for that. I can't figure out how to do it with rclone until gdrive is fixed

develooper1994 commented 4 years ago

unfortunately but I don't need anymore.

yarkm13 commented 4 years ago

No need to compile from source, just create service account in google console and use --service-account option

mdobydullah commented 4 years ago

Thanks @yarkm13 for sharing. I've tried some methods. Unfortunately, no method worked. Then I've compiled from source and works.

yarkm13 commented 4 years ago

@mdobydullah you just need to go to https://console.cloud.google.com/iam-admin/serviceaccounts and create service account and you will be able to download json file with credentials (something like project-name-111-1b3f56a.json). Than put it to ~/.gdrive/ and run gdrive

./gdrive --service-account project-name-111-1b3f56a.json about

such method was not mentioned in thread

mdobydullah commented 4 years ago

@yarkm13 thanks again. I'll try this method. :)

yarkm13 commented 4 years ago

@mdobydullah i will be glad to hear from you if it was [in]successful. Please share your experience

mdobydullah commented 4 years ago

@yarkm13 sure... :)

nftleader commented 4 years ago

@mdobydullah you just need to go to https://console.cloud.google.com/iam-admin/serviceaccounts and create service account and you will be able to download json file with credentials (something like project-name-111-1b3f56a.json). Than put it to ~/.gdrive/ and run gdrive

./gdrive --service-account project-name-111-1b3f56a.json about

such method was not mentioned in thread

I tried but uploaded file does not appear in my google drive and it's not able to view & download from browser. The service account is the owner of the file. What to do next?

sanketssj5 commented 4 years ago

This works. Thank You

mdobydullah commented 4 years ago

@captainheart Sorry for late reply. Please follow these steps.

mdobydullah commented 4 years ago

@sanketssj5 Great. Nice to hear. :)

tslater commented 3 years ago

@nftleader I created a service account and did this...it uploaded...but now how do I know what account they uploaded to? the project is part of an organization. Do you know how to specify a user account?