🔥
DVCでGoogle Driveを使うときにハマった点: 「このアプリはブロックされます」
問題: Google Drive に dvc push できない
あるとき、dvc push
を行ったら、「このアプリはブロックされます」と出てきてしまった。
やったこと
推奨されている通り、Google Cloud project を使う
手順
- (初回のみ)Using a custom Google Cloud project (recommended) に記載の通り、Google Drive API を使うための Google Cloud project および OAuth 認証のためのIDとclient secretを作成
- 手順は詳細に記載してあるので、割愛
- DVCでGoogle Drive API を使う用の Google Cloud project に切り替え、左サイドバーの「APIとサービス」から「認証情報」にアクセス、クライアントIDとクライアントシークレットを取得
- 以下のコマンドを実行。これは、各プロジェクトごとに必要
dvc remote modify myremote gdrive_client_id 'client-id'
dvc remote modify myremote gdrive_client_secret 'client-secret'
参考にしたリンク
- Unable connect dvc to Google Drive. Access blocked! #10516
- DVC のサイトでも、"There is an ongoing issue and the default Google DVC app is affected. If you see "This app is blocked" message, check this ticket for a workaround and more details."と出ていた
Discussion