# I have added my google drive as a remote storage

**URL:** <https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061>\
**Category:** Questions\
**Created:** [February 14, 2022, 4:40am UTC](https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061 "2022-02-14T04:40:15Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![rajib76](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@rajib76](https://discuss.dvc.org/u/rajib76)\
**Post date:** [February 14, 2022, 4:40am UTC](https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061/1 "2022-02-14T04:40:15Z")

</div>

…but when I do a dvc push, i get the below error. Any idea how to resolve this. i am following the getting started sessions to get myself familiar with the product

ERROR: unexpected error - : \<HttpError 404 when requesting [https://www.googleapis.com/drive/v2/files/16uQro82U1-Ox3ABLZ0Oa7uNUJr0T9BD-?fields=driveId&supportsAllDrives=true&alt=json](https://www.googleapis.com/drive/v2/files/16uQro82U1-Ox3ABLZ0Oa7uNUJr0T9BD-?fields=driveId&supportsAllDrives=true&alt=json) returned “File not found: 16uQro82U1-Ox3ABLZ0Oa7uNUJr0T9BD-”. Details: “[{‘domain’: ‘global’, ‘reason’: ‘notFound’, ‘message’: ‘File not found: 16uQro82U1-Ox3ABLZ0Oa7uNUJr0T9BD-’, ‘locationType’: ‘other’, ‘location’: ‘file’}]”\>

---

<div class="post-metadata">

**Author:** ![skshetry](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@skshetry](https://discuss.dvc.org/u/skshetry)\
**Post date:** [February 14, 2022, 1:08pm UTC](https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061/2 "2022-02-14T13:08:21Z")

</div>

Hi, could you please share the output of `dvc push -v` and `dvc doctor`? Thanks.

---

<div class="post-metadata">

**Author:** ![rajib76](https://avatars.discourse-cdn.com/v4/letter/r/8c91f0/32.png) [@rajib76](https://discuss.dvc.org/u/rajib76)\
**Post date:** [February 15, 2022, 1:37am UTC](https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061/3 "2022-02-15T01:37:57Z")

</div>

It is showing a permission error but I have already given the permission

Traceback (most recent call last):  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 121, in \_gdrive\_shared\_drive\_id  
item.FetchMetadata(“driveId”)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/auth.py”, line 84, in \_decorated  
return decoratee(self, \*args, \*\*kwargs)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/files.py”, line 448, in FetchMetadata  
raise ApiRequestError(error)  
pydrive2.files.ApiRequestError: \<HttpError 404 when requesting [https://www.googleapis.com/drive/v2/files/16uQro82U1-Ox3ABLZ0Oa7uNUJr0T9BD-?fields=driveId&supportsAllDrives=true&alt=json](https://www.googleapis.com/drive/v2/files/16uQro82U1-Ox3ABLZ0Oa7uNUJr0T9BD-?fields=driveId&supportsAllDrives=true&alt=json) returned “File not found: 16uQro82U1-Ox3ABLZ0Oa7uNUJr0T9BD-”. Details: “[{‘domain’: ‘global’, ‘reason’: ‘notFound’, ‘message’: ‘File not found: 16uQro82U1-Ox3ABLZ0Oa7uNUJr0T9BD-’, ‘locationType’: ‘other’, ‘location’: ‘file’}]”\>

The above exception was the direct cause of the following exception:

Traceback (most recent call last):  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/main.py”, line 55, in main  
ret = cmd.do\_run()  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/command/base.py”, line 45, in do\_run  
return self.run()  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/command/data\_sync.py”, line 57, in run  
processed\_files\_count = self.repo.push(  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/repo/ **init**.py”, line 49, in wrapper  
return f(repo, \*args, \*\*kwargs)  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/repo/push.py”, line 56, in push  
pushed += self.cloud.push(  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/data\_cloud.py”, line 85, in push  
return transfer(  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/objects/transfer.py”, line 153, in transfer  
status = compare\_status(src, dest, obj\_ids, check\_deleted=False, \*\*kwargs)  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/objects/status.py”, line 158, in compare\_status  
dest\_exists, dest\_missing = status(  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/objects/status.py”, line 131, in status  
exists.update(odb.hashes\_exist(hashes, name=odb.fs\_path, \*\*kwargs))  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/objects/db/base.py”, line 470, in hashes\_exist  
remote\_hashes = self.list\_hashes\_exists(hashes, jobs, name)  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/objects/db/base.py”, line 421, in list\_hashes\_exists  
ret = list(itertools.compress(hashes, in\_remote))  
File “/opt/miniconda3/lib/python3.9/concurrent/futures/\_base.py”, line 608, in result\_iterator  
yield fs.pop().result()  
File “/opt/miniconda3/lib/python3.9/concurrent/futures/\_base.py”, line 445, in result  
return self.\_\_get\_result()  
File “/opt/miniconda3/lib/python3.9/concurrent/futures/\_base.py”, line 390, in \_\_get\_result  
raise self.\_exception  
File “/opt/miniconda3/lib/python3.9/concurrent/futures/thread.py”, line 52, in run  
result = self.fn(\*self.args, \*\*self.kwargs)  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/objects/db/base.py”, line 412, in exists\_with\_progress  
ret = self.fs.exists(fs\_path)  
File “/opt/miniconda3/lib/python3.9/site-packages/dvc/fs/fsspec\_wrapper.py”, line 91, in exists  
return self.fs.exists(path)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 225, in exists  
self.\_get\_item\_id(path)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 192, in \_get\_item\_id  
item\_ids = self.\_path\_to\_item\_ids(base, create, use\_cache)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 174, in \_path\_to\_item\_ids  
item\_ids = self.\_get\_cached\_item\_ids(path, use\_cache)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 170, in \_get\_cached\_item\_ids  
return self.\_ids\_cache[“dirs”].get(path, [])  
File “/opt/miniconda3/lib/python3.9/site-packages/funcy/objects.py”, line 50, in **get**  
return prop. **get** (instance, type)  
File “/opt/miniconda3/lib/python3.9/site-packages/funcy/objects.py”, line 28, in **get**  
res = instance. **dict** [self.fget. **name**] = self.fget(instance)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 82, in \_ids\_cache  
for item in self.\_gdrive\_list(  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 132, in \_gdrive\_list  
param.update(self.\_list\_params)  
File “/opt/miniconda3/lib/python3.9/site-packages/funcy/objects.py”, line 28, in **get**  
res = instance. **dict** [self.fget. **name**] = self.fget(instance)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 100, in \_list\_params  
drive\_id = self.\_gdrive\_shared\_drive\_id(self.root)  
File “/opt/miniconda3/lib/python3.9/site-packages/funcy/decorators.py”, line 45, in wrapper  
return deco(call, \*dargs, \*\*dkwargs)  
File “/opt/miniconda3/lib/python3.9/site-packages/funcy/flow.py”, line 127, in retry  
return call()  
File “/opt/miniconda3/lib/python3.9/site-packages/funcy/decorators.py”, line 66, in **call**  
return self.\_func(\*self.\_args, \*\*self.\_kwargs)  
File “/opt/miniconda3/lib/python3.9/site-packages/pydrive2/fs/spec.py”, line 125, in \_gdrive\_shared\_drive\_id  
raise PermissionError from exc  
PermissionError

---

<div class="post-metadata">

**Author:** ![skshetry](https://avatars.discourse-cdn.com/v4/letter/s/eb8c5e/32.png) [@skshetry](https://discuss.dvc.org/u/skshetry)\
**Post date:** [February 15, 2022, 8:29am UTC](https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061/4 "2022-02-15T08:29:14Z")

</div>

How did you setup gdrive? Did you follow this [setup guide](https://dvc.org/doc/user-guide/setup-google-drive-remote)?

---

<div class="post-metadata">

**Author:** ![Tom\_K](https://avatars.discourse-cdn.com/v4/letter/t/a5b964/32.png) [@Tom\_K](https://discuss.dvc.org/u/Tom_K)\
**Post date:** [May 1, 2022, 1:26pm UTC](https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061/5 "2022-05-01T13:26:47Z")

</div>

Hi, @skshetry not sure if this was solved but I encountered the same issue. I followed along with the remote storage setup. However, one difference is that I did not use dvc add because I had written the dependencies and outputs directly in the dvc.yaml file. Secondly, I only allowed dvc access / permission to see, create, and delete its own configuration data. If I need to change the dvc permissons, how do I do that after the initial setup?

–solved–  
So I guess dvc needs access to everything. The authorization section was helpful, [https://dvc.org/doc/user-guide/setup-google-drive-remote?\_ga=2.39431651.1183132044.1651410796-478586346.1651410796#authorization](https://dvc.org/doc/user-guide/setup-google-drive-remote?_ga=2.39431651.1183132044.1651410796-478586346.1651410796#authorization)  
just delete the user credentials in the .dvc/tmp file and try again.

---

<div class="post-metadata">

**Author:** ![Shrek](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Shrek](https://discuss.dvc.org/u/Shrek)\
**Post date:** [November 17, 2022, 3:58pm UTC](https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061/6 "2022-11-17T15:58:33Z")

</div>

Hello if anyone is willing to help I have tried the above steps and to my surprise it worked on my college id when I tried to push but on my personal gmail its not working.

 ![329180134ee2fb6417bf6b250e5ddb4a-1](https://canada1.discourse-cdn.com/flex035/uploads/dataversioncontrol/original/1X/cefc83e22d7923b9685b91b2e0d617acb928dfe0.jpeg)  
Thanks in advance

---

<div class="post-metadata">

**Author:** ![Shrek](https://avatars.discourse-cdn.com/v4/letter/s/b487fb/32.png) [@Shrek](https://discuss.dvc.org/u/Shrek)\
**Post date:** [November 17, 2022, 3:59pm UTC](https://discuss.dvc.org/t/i-have-added-my-google-drive-as-a-remote-storage/1061/7 "2022-11-17T15:59:22Z")

</div>

![329180134ee2fb6417bf6b250e5ddb4a-2](https://canada1.discourse-cdn.com/flex035/uploads/dataversioncontrol/original/1X/960fac6ee53992d911bcd56315271a6fb8d6487c.jpeg)

Another Pic for permission encountered error
