duck (CyberDuck CLI) with google drive

745 Views Asked by At

I'm trying to get the Cyberduck CLI (duck.sh) to work interfacing with a google drive (not "Google Cloud Storage") and I'm having problems getting the oAuth authorization to work. I found this thread but it's out of date - as the newer versions of Cyberduck do absolutely work with Google Drive. Using the regular cyberduck GUI I can browse and operate on my G-drive instance, but I can't quite quack the code (sorry!) for how to make this work using the CLI.

[lwobker:~]$ duck -l googledrive://<user>@gmail.com/                   
Authenticating as <user>…
OAuth2 Authentication. Paste the authentication code from your web browser.
Authentication Code: <pasted pass here>

Save password (y/n): n
Disconnecting www.googleapis.com…
Login failed. Malformed auth code. Please contact your web hosting service provider for assistance.

I've tried a number of different URLs, including: @gmail.com [email protected]@www.googleapis.com and a couple of others.

I also can't seem to figure out where the GUI version of cyberduck stores it's authorized credentials... if I could re-use those that would be fine, doing a one-time setup at the beginning doesn't break my use case.

I'm somewhat familiar with the Google Developers API, and I've created one for use with this project, but I can't seem to figure out how the Google "Client ID" and other credentials map to the Cyberduck tool.

1

There are 1 best solutions below

0
On

Make sure you paste the auth code obtained from the Google login page opened exactly as is without any line breaks. More information is available in the wiki.