Comments (9)
I just used cURL when using vdirsyncer on a remote server. If you follow these steps you don't need to run it locally:
- Run
vdirsyncer discover google_calendar
, - Keep the command running and open the URL in a browser
- Go through the Google Flow and see you are redirect to
127.0.0.1
. Copy the url you end up at. - Open another terminal on the server where
vdirsyncer
is running - Use cURL like this:
curl "PASTE_URL_HERE"
, mind the quotes else the&
might be parsed wrongly by your shell. - The discover should now continue
Note: This also works for the Docker Container, if you execute the cURL in the container.
from vdirsyncer.
For context, Google dropped support for the authentication flow that we previously used (which was the one designed for desktop applications), but hasn't provided any suitable replacement.
We're currently using the flow that's designed for web applications, and our design expects you to be running vdirsyncer on your local machine.
As a workaround, you can set it up locally and copy the token file to your remote machine. Regrettably inputting the token via the cli isn't implemented right now (though should honestly be doable).
from vdirsyncer.
I have the same setup and can confirm the workaround works fine for me. I simply run vdirsyncer discover google_calendar
on my local machine, abort by not creating the local collection, scp
the token file to my remote server and use it there running vdirsyncer sync
through a cronjob.
from vdirsyncer.
Thank you guys for your responses, that definitely points me in the right direction. The only problem though, is that all of my computers are Windows. The only Linux machines I have are VPS. Do you think I could set this up with WSL?
from vdirsyncer.
Probably. Otherwise you could just boot Linux from a USB pendrive or run it in a VM for that purpose. An alternative might be to configure your SSH with X-forwarding so you could open the VPS's graphical browser on your local machine. I have no clue how to do that on Windows though and have no interest in offering free (as in free beer) support for a non-free (as in freedom) OS.
from vdirsyncer.
For context, Google dropped support for the authentication flow that we previously used (which was the one designed for desktop applications), but hasn't provided any suitable replacement.
We're currently using the flow that's designed for web applications, and our design expects you to be running vdirsyncer on your local machine.
As a workaround, you can set it up locally and copy the token file to your remote machine. Regrettably inputting the token via the cli isn't implemented right now (though should honestly be doable).
I'm to assume this means setting it up on a local *nix box, and then copying whatever file we have set as token_file
in the ~/.vdirsyncer/config
, and then putting on over on the remote server that we intend to be doing most of the syncing? Because I can't get a token file generated in the first place. With "Web Application", Google tells me that my redirect_uri
is forbidden, and it hardly matters - since it's always 127.0.0.1
and some random port, which obviously doesn't load anything in the browser.
Tried copying and pasting the code into the SSH session, but that doesn't work.
My specs:
-
Your vdirsyncer version: 0.19.1
-
If applicable, which server software (and which version) you're using: pipx install vdirsyncer[google]
-
Your Python version: 3.9
-
Your operating system: Alma Linux 8.7
-
Your config file: Baikal to Google config - Baikal part seems to be working fine
-
Use
vdirsyncer -vdebug
for debug output. The output is sensitive, but please attach at least the last few lines before the error (if applicable), censored as necessary. This is almost always the most useful information.
from vdirsyncer.
Because I can't get a token file generated in the first place. With "Web Application", Google tells me that my redirect_uri is forbidden, and it hardly matters - since it's always 127.0.0.1 and some random port, which obviously doesn't load anything in the browser.
@tromlet, have a look at this comment which might fix your problem.
from vdirsyncer.
The latest release updated the instructions for getting a google token. Please review them when upgrading.
from vdirsyncer.
I've the same problem: I'm running vdirsyncer in docker, so it's impossible for me to obtain the token file. I have to run a VM,
install vdirsyncer, run it with google config to get the token, then copy it somwhere else and put in the directory of my docker container.
It's a bit crazy. I ask you if it's not possible to create a script to simply get the token file (and name it correctly), that's also runnable in windows cli. I used that method before for other components, for example this one: https://github.com/IvanVojtko/googlefit-homeassistant/blob/master/get_credentials.py
Thank you
from vdirsyncer.
Related Issues (20)
- Nextcloud imported calendar not found HOT 1
- Feature request: add a no_delete option to the storage configuration HOT 4
- Issue aggregating multiple iCalendars feeds into a single CalDAV calendar HOT 2
- Changes to the order of VTIMEZONE components in an .ics file cause sync conflicts against calDAV HOT 2
- Request mechanism to debug "multiple items with the same UID" HOT 3
- Cannot update to latest version (ubuntu/jammy) HOT 3
- unknown error occurred in prepare_new_status HOT 3
- warning: Skipping identical href : Possible to synchronize anyway?
- Make verify_fingerprint work with auth_cert
- When syncing with Google Calendar, if the GCal side is empty, vdirsyncer errors with "Storage was completely emptied" (on local side)
- Sync aborted after a single error HOT 2
- Invalid ICS files (missing `END:VEVENT`s and `END:VCALENDAR`) are silently ignored HOT 1
- contacts.html: Link "contact the author directly" broken
- Add a `pre_deletion_hook`
- Sync fails randomly with Nextcloud's "Contact birthdays" calendar.
- Failed to discover collections for google_contacts HOT 1
- Support higher version of aiostream HOT 3
- Unknown error unable to open database file HOT 1
- better default vdir storage path using $XDG_DATA_HOME HOT 2
- Finding no collections when trying to sync shared icloud calendar
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vdirsyncer.