-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable connect dvc to Google Drive. Access blocked! #10516
Comments
I have precisely the same issue. |
Same problem |
TL;DR:The DVC app (that is used by default by DVC) is blocked by Google because they changed some policies and we need pass the verifications again. There was nothing bad happening (like security breaches or violations) on our end. There is not easy way to pass it. For now the recommended way (and it was always the recommended way) - is to create a custom app. Here is the link. It's not very complicated and should work just fine for everyone. Longer versionTue, Nov 14, 2023 - Google reached out with this message:
DVC app indeed depends on the
Anyways, it would be better to have a more granular permissions. And it seems Google understand this, we also like it. The only issue is that there is no API or any way to let users So, we kinda stuck in limbo with this a bit - we can't pass verification (since they are requesting a video explainer where it's clear why we need I'm open to any ideas on this. Also a relevant discussion on the |
@shcheklein, thank you for the clarification! We will proceed with the custom app option. |
Same problem here |
@tharhtetsan Find the answer here - #10516 (comment) |
😠 google disgraceful policy |
the custom app using the Google cloud option works, but would have preferred the older way of authenticating with gdrive, which was fairly easy |
Even the Google cloud option didn't work for me, it failed with |
You can authenticate in google at your own. First, you need to create oauth client id (like here). Then, download the client id json and use the following code: import json
from oauth2client.client import OAuth2WebServerFlow, flow_from_clientsecrets
from oauth2client.file import Storage
from oauth2client.tools import run_flow
# Path to your OAuth2 client_id.json file
CLIENT_SECRET_FILE = 'client_secret.json'
# The scope for the Google Drive API
SCOPES = ['https://www.googleapis.com/auth/drive', 'https://www.googleapis.com/auth/drive.appdata']
def get_token_oauth2client():
# Load the client secrets from the JSON file
flow = flow_from_clientsecrets(CLIENT_SECRET_FILE, scope=SCOPES)
# Run the authentication flow and retrieve credentials
storage = Storage('token_oauth2client.json')
credentials = run_flow(flow, storage)
with open('generated_token.json', 'w') as token_file:
token_file.write(credentials.to_json())
print("Token information saved to generated_token.json")
if __name__ == '__main__':
get_token_oauth2client() Then, you need to move Profit! Yes, it's a clutch, but it's the only way I found so far. cp: @kell18 |
Thanks for the answer @RodionfromHSE it'd work if I'd need to do it only once for myself, but it's for everyone in the team... I hope DVC will fix this issue soon! |
The solution from @RodionfromHSE is the only one that worked for me, thanks! |
I am considering migrating to git LFS due to this problem.
|
@SchindlerTo @ryukinix take a look here iterative/PyDrive2#184 (comment) . I think that was a relevant discussion. |
Added by @shcheklein :
See details and workaround here - #10516 (comment)
Failed to authenticate GDrive: "This app is blocked"
Description
When I use DVC commands with a gdrive remote storage configuration, I encounter an issue where it's impossible to authenticate with my Google account.
Reproduce
After initiating the command
a browser window opens for authentication, but upon selecting my Google account, I'm directed to a page displaying the message:
Environment information
Output of
dvc doctor
:I'm not sure if this is a bug, but any help with this issue would be greatly appreciated!
The text was updated successfully, but these errors were encountered: