FYI: All my Insync-Headless stuff was run under SSH also.
Main difference, is my setup is Debian as opposed to RedHat/Fedora. Not sure if that really should be a factor in any of this though? Unless there is some missing dependency, package, or configuration detail specific to RedHat/Fedora?
The only parts I did on a separate PC with a GUI was visiting that web-site to generate the auth-code, which I then pasted-in as part of the process of adding the account to Inysnc-Headless under SSH.
Here’s basically everything I did:
On the Linux server (under SSH):
- Removed any previous account from the Insync-Headless setup. I had actually previously removed the gMail already after the last failed attempt some time ago.
insync-headless account list;
If needed …
insync-headless account remove username@gmail.com;
On a PC with a GUI and a web-browser (Chrome in my case):
- Opening a new “Incognito” Window in Chrome.
- Signing-into G-Mail, in that “Incognito” window.
- Opened https://myaccount.google.com/u/0/permissions, in that same “Incognito” window.
- Make sure Insync is no longer listed as havving permission to that account (note: I only have 1 server though).
- Opened https://connect.insynchq.com/auth?cloud=gd, in that “Incognito” Window.
- Since it is an “Incognito” window, only the one google account should show to select, which I did select.
- Copying the authorization code generated in the “Incognito” window to the clipboard (and later text file) for later in under SSH.
On the Linux server (under SSH):
-
Used the Insync-Headess CLI to add the account, using the authentication code acquired above. Like this:
insync-headless account add -c gd -p /home/username/whateverfolder -a really-long-string-of-letters-and-numbers-here;
-
Checked the Insync-Headless status for errors:
insync-headless status;
-
Verified my “selective sync” was setup the way I wanted:
insync-headless selective-sync;
-
Verified my automatic “conflict resolution” was setup the way I wanted:
insync-headless conflict resolution;
-
Periodically checked the status to make sure no errors were popping-up, and show any uploads/downloads in progress:
insync-headless status;
PS: Regarding multiple instances:
Since I am using multiple instances of Insync-Headless, all using the same Google account, all on the same server - but, under different Linux users, I had to go back and repeat those steps a few times.
HOWEVER, I only deleted the permissions from the Google account for Insync prior to setting-up the first instance. For subsequent instances, I did generate a new authentication code for each.