# Connect Gdrive on a remote computer

**URL:** <https://discuss.dvc.org/t/connect-gdrive-on-a-remote-computer/1249>\
**Category:** Questions\
**Created:** [July 15, 2022, 7:06pm UTC](https://discuss.dvc.org/t/connect-gdrive-on-a-remote-computer/1249 "2022-07-15T19:06:07Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rmbzmb](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@rmbzmb](https://discuss.dvc.org/u/rmbzmb)\
**Post date:** [July 15, 2022, 7:06pm UTC](https://discuss.dvc.org/t/connect-gdrive-on-a-remote-computer/1249/1 "2022-07-15T19:06:07Z")

</div>

I am working on a remote workstation and would like to pull data. I can copy and past that link

```auto
dvc pull
  0% Querying remote cache| |0/1 [00:00<?, ?files/s]Your browser has been opened to visit:

    https://accounts.google.com/o/oauth2/...

```

into my local browser and login allow access, but then the token is not transfered to the remote machine, which gets stuck.

To clarify, I am logged in to a workstation via ssh and want to pull the data to that workstation, while the data repository is on GDrive. I want to execute all commands on that workstation remotely and I don’t want to use that workstation as my data-repo.

---

<div class="post-metadata">

**Author:** ![YanxiangGao](https://avatars.discourse-cdn.com/v4/letter/y/f04885/32.png) [@YanxiangGao](https://discuss.dvc.org/u/YanxiangGao)\
**Post date:** [July 16, 2022, 3:38am UTC](https://discuss.dvc.org/t/connect-gdrive-on-a-remote-computer/1249/2 "2022-07-16T03:38:32Z")

</div>

Hi, rmbzmb  
Could you please provide some more detailed logs through

```auto
dvc pull -vv

```

And some more DVC info through

```auto
dvc doctor

```

---

<div class="post-metadata">

**Author:** ![rmbzmb](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@rmbzmb](https://discuss.dvc.org/u/rmbzmb)\
**Post date:** [July 18, 2022, 9:32am UTC](https://discuss.dvc.org/t/connect-gdrive-on-a-remote-computer/1249/3 "2022-07-18T09:32:10Z")

</div>

The following I tried locally and it worked, however, when I executed the same steps on the remote workstation I get errors below. I am using the same json file though.

```auto
dvc remote modify storage gdrive_use_service_account true
dvc remote modify storage --local gdrive_service_account_json_file_path .dvc/gdrive-access.json
dvc pull

```

> ERROR: unexpected error - \<HttpError 403 when requesting [https://www.googleapis.com/drive/v2/files/](https://www.googleapis.com/drive/v2/files/)…?fields=driveId&supportsAllDrives=true&alt=json returned “Access Not Configured. Drive API has not been used in project … before or it is disabled. Enable it by visiting [https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=...then](https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=...then) retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.”. Details: “[{‘domain’: ‘usageLimits’, ‘reason’: ‘accessNotConfigured’, ‘message’: ‘Access Not Configured. Drive API has not been used in project … before or it is disabled. Enable it by visiting [https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=](https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=)… then retry. If you enabled this API recently, wait a few minutes for the action to propagate to our systems and retry.’, ‘extendedHelp’: ‘[https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=](https://console.developers.google.com/apis/api/drive.googleapis.com/overview?project=)…’}]”\>

`dvc pull -vv`

```auto
------------------------------------------------------------
2022-07-18 03:34:29,370 DEBUG: Version info for developers:
DVC version: 2.13.0 (pip)
---------------------------------
Platform: Python 3.9.13 on Linux-5.4.0-113-generic-x86_64-with-glibc2.31
Supports:
        gdrive (pydrive2 = 1.10.1),
        hdfs (fsspec = 2022.5.0, pyarrow = 8.0.0),
        webhdfs (fsspec = 2022.5.0),
        http (aiohttp = 3.8.1, aiohttp-retry = 2.5.2),
        https (aiohttp = 3.8.1, aiohttp-retry = 2.5.2)
Cache types: <https://error.dvc.org/no-dvc-cache>
Caches: local
Remotes: gdrive
Workspace directory: ext4 on /dev/mapper/ubuntu--vg-root
Repo: dvc, git

Having any troubles? Hit us up at https://dvc.org/support, we are always happy to help!
2022-07-18 03:34:29,372 DEBUG: Analytics is enabled.
2022-07-18 03:34:29,426 DEBUG: Trying to spawn '['daemon', '-q', 'analytics', '/tmp/tmp5jdm7j8x']'
2022-07-18 03:34:29,429 DEBUG: Spawned '['daemon', '-q', 'analytics', '/tmp/tmp5jdm7j8x']'

```

When I visit that google URL I am getting an error: `You do not have sufficient permissions to view this page`. Apparently, Chrome uses the wrong account and there is no option to change the account.

---

<div class="post-metadata">

**Author:** ![rmbzmb](https://avatars.discourse-cdn.com/v4/letter/r/ed8c4c/32.png) [@rmbzmb](https://discuss.dvc.org/u/rmbzmb)\
**Post date:** [July 18, 2022, 1:46pm UTC](https://discuss.dvc.org/t/connect-gdrive-on-a-remote-computer/1249/4 "2022-07-18T13:46:57Z")

</div>

Finally, it works. One of the things I had to do was to share the Gdrive folder containing the registry with the service account email with read/write permissions. It is not enough to create the service account. Though I am not sure why with the same JSON file, I get write permissions on one computer, but not on another computer. Maybe because I authenticated the first computer with the web-form.
