🔥

DVCでGoogle Driveを使うときにハマった点: 「このアプリはブロックされます」

2025/01/28に公開

問題: 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'

参考にしたリンク

Discussion