Skip to content

Downloading large files shared via google drive to Klone

adrianas edited this page Dec 23, 2023 · 2 revisions

Use Rclone:

Install rclone on both klone and on your personal computer:

conda install -c conda-forge rclone

On Klone:

- rclone config
- n [new] (type name for this configuration)
- storage> [18] (select num that corresponds to cloud repo, in this case, 18 is for google drive)
- client_id> Enter
- client_secret> Enter
- scope> [2] (read-only access)
- service_account_file> Enter
- advanced_config> [no]
- Use web browser [no]
- config_token> (wait here, leave open)

Then, in your personal computer, open your console and run the command displayed by rclone:

.\rclone authorize "drive" "key"

It will then open a browser, and once you authenticate with your credentials, it wil lgenerate a token that you need to copy and paste back into klone:

- config_token> (paste token)
- Configure this as a shared drive? [yes/no]
- Confirm configuration [yes, this is OK]

On your computer, go to google drive, and you should see the file that was shared with you by the collaborators. If you click on the 3 dots > organize > add shortcut > select My drive (and create a shortcut to your personal drive), the link to that file should be observed there now.

Once this is done, go back to your console in klone and type:

Load your config access:
- rclone [name of your configuration]
rclone myconfig

List all files in your drive:
- rclone ls [name of your configuration:] 
rclone ls myconfig:

Copy from  my drive to klone (current directory):
- rclone copy myconfig:'filename' .    

Wait for file to download and it is done! 👍

Clone this wiki locally