-
Notifications
You must be signed in to change notification settings - Fork 426
Description
Hi,
This may be a beginner "I can not figure out how to use this" type question.
What steps am I missing?
Your documentation is comprehensive, but a walkthrough guide and signposts would be welcome for less able users.
Would you be interested if I wrote one / otherwise made a contribution to the README? (once I get this working)
================================================================
Pre-existing:
- A personal google drive account
Steps followed:
- Created a new service-account on Google cloud console ("serviceaccount1")
- Created personal key for the service account, and downloaded the json (code-obfuscated-XXXXXX-XX-XXXXXXXXXXXX.json)
- Enabled Google Drive API for the service account
- At the web page interface, shared a folder with the service account, and gave it editor access
- Created new folder in local home directory ("~/google-drive-shared")
- Initialized the folder:
~/go/bin/drive init --service-account-file ~/code-obfuscated-XXXXXX-XX-XXXXXXXXXXXX.json -id YYYYYYYYYYYYYYYYYYYYYYYYYYY ~/google-drive-shared - Relocated to the new folder, and pulled from Google drive:
$ ~/go/bin/drive pull -id 1t8hARpY7gLPVmHQFxMnG-mmkb7vVxkvu - Made a new file, and tried resyncing to Google Drive:
~/go/bin/drive push --no-clobber
Expected behaviour:
- Only the new file would be uploaded
Actual behaviour:
- Drive uploads everything to the root folder of the service account. The shared folder on Google Drive is not re-uploaded to.
Resolving...
- /Documents
- /Documents/file.png
...- /Data-documents/FILE.md
- /Data-documents/README.md
Addition count 1816 src: 1.49GB
Proceed with the changes? [Y/n]:
~/google-drive-shared$~/go/bin/drive stat -id YYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYY
Filename Documents
FileId YYYYYYYYYYYYYYYYYYYYYYYYYYY
Bytes 0
Size 0.00B
QuotaBytesUsed 0
DirType folder
VersionNumber 16
MimeType application/vnd.google-apps.folder
Etag "abcdefghijklmnopqrstuvwxyz"
ModTime 2025-06-07 15:19:41 +0000 UTC
LastViewedByMe 0001-01-01 00:00:00 +0000 UTC
Shared true
Owners username
LastModifyingUsername username
OriginalFilename
Starred false
Viewed false
Trashed false
ViewersCanDownload false
Name: username [email protected]
Role owner
AccountType user
*
Name: serviceaccount1@code-obfuscated-XXXXXX-XX-XXXXXXXXXXXX serviceaccount1@code-obfuscated-XXXXXX-XX-XXXXXXXXXXXX
Role writer
AccountType user
*
~/google-drive-shared$ ~/go/bin/drive list -id YYYYYYYYYYYYYYYYYYYYYYYYYYY
YYYYYYYYYYYYYYYYYYYYYYYYYYY/Documents/FILE.md
YYYYYYYYYYYYYYYYYYYYYYYYYYY/Documents/file1.png
...
~/google-drive-shared$ ~/go/bin/drive list -depth 1
... No output ...
The wiki page here (https://github.com/odeke-em/drive/wiki/FAQ) suggests:
~/go/bin/drive drive init ~/google-drive
but this only returns the help menu:
Usage: /home/luke/go/bin/drive
where is one of:
about print out information about your Google drive
clashes fix clashes by renaming or trashing all files
...etc.
