Giter Club home page Giter Club logo

gdrive's Introduction

gdrive

Overview

gdrive is a command line application for interacting with Google Drive. This is the successor of gdrive2, though at the moment only the most basic functionality is implemented.

Community

Join our discord server to discuss everything gdrive.

Sponsor

Help keep this project alive. By sponsoring the gdrive tier you will help support:

  • Keeping up with api changes
  • Development of new features
  • Fixing and answering of issues
  • Writing of guides and docs

Getting started

Requirements

  • Google OAuth Client credentials, see docs

Install binary

  • Download the latest binary from the release section
  • Unpack and put the binary somewhere in your PATH (i.e. /usr/local/bin on linux and macos)
  • Note that the binary is not code signed and will cause a warning on windows and macos when running. This will be fixed later, but for now you can find a workaround via your favorite search engine.

Add google account to gdrive

  • Run gdrive account add
  • This will prompt you for your google Client ID and Client Secret (see Requirements)
  • Next you will be presented with an url
  • Follow the url and give approval for gdrive to access your Drive
  • You will be redirected to http://localhost:8085 (gdrive starts a temporary web server) which completes the setup
  • Gdrive is now ready to use!

Using gdrive on a remote server

Part of the flow for adding an account to gdrive requires your web browser to access localhost:8085 on the machine that runs gdrive. This makes it tricky to set up accounts on remote servers. The suggested workaround is to add the account on your local machine and import it on the remote server:

  1. [local] Run gdrive account add
  2. [local] Run gdrive account export <ACCOUNT_NAME>
  3. [local] Copy the exported archive to the remote server
  4. [remote] Run gdrive account import <ARCHIVE_PATH>

Credentials

Gdrive saves your account credentials and tokens under $HOME/.config/gdrive3/. You don't usually need to use these files directly, but if someone gets access to them, they will also be able to access your Google Drive. Keep them safe.

Gdrive on virtual machines in the cloud

There are some issues communicating with the Drive API from certain cloud providers. For example on an AWS instance the api returns a lot of 429 Too Many Requests / 503 Service Unavailable / 502 Bad Gateway errors while uploading. While the same file uploads without any errors from a Linode instance. Gdrive has retry logic built in for these errors, but it can slow down the upload significantly. To check if you are affected by these errors you can run the upload command with these flags: --print-chunk-errors --print-chunk-info.

gdrive's People

Contributors

anlif avatar dirkhoffmann avatar holtzermann17 avatar nick-cd avatar prasmussen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.