-
Notifications
You must be signed in to change notification settings - Fork 315
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Authenticating on a headless system #808
Comments
Hmm, did you try the Besides port forwarding, you're not going to be able to monkey with the URLs to get something to work. Your browser needs to be able to hit the target URL directly to transfer the token. Dupe of fixed #734, I believe, apart from any additional documentation you might be asking for. |
I guess as far as docs go, one piece that probably needs an overhaul is the stuff in the README about env vars like Pretty sure those haven't worked in ages but I still never figured out exactly what they were referring to so I wasn't sure exactly what updates to make there. They just appeared in 770393f. @insanum do you have any pointer on those? |
Yeah not sure why the |
To be clear, it's not going to just work exactly like it used to, the behavior has changed. If you're running it deep inside a script then you might just not have noticed the new output, but the gist is that Google deprecated the old behavior and the command now prints some detailed instructions for SSH port forwarding, which is the best available approach right now. |
Ah ok that makes sense, totally glossed over that output until now. Since I do not have a browser installed on the pi I would venture to add a new |
I'm open to ideas for better workarounds but as far as I know if you're not port forwarding you're doing something even more brittle and complicated. The web browser needs to be able to open a connection to the target device and port where gcalcli is running. If they're on the same network and can access each others' IPs and ports are open then you could replace localhost with another address without needing forwarding, but that's almost never going to "just work". IIUC the reason it was able to work more seamlessly before is that you had remote Google servers helping bridge communication between the two independent devices (the "Out-Of-Band flow" and similar), but Google decided they don't want to support that anymore for some security risk reasons. |
Yeah, that was one of the first things I tried, using the IP and the Domain Name, but I am guessing my pi probably had the port blocked off in the firewall rules because it still failed. That is where I figured the URL provided by redirect_uri from google with code: Sorry if this is getting long winded but just had a whole other brain shift... Since the By the way still, thank you again for all the work you have done on this @dbarnett |
I thought it was addressed on 4.4 and on but couldn't find any notes on it. I have a headless system (rpi) that I run this on for my scrolling Marquee and had not managed to need to authenticate since I upgraded from 4.3 to 4.5, until this evening. If a note about this could be added to the documentation that would be awesome. The
--noauth_local_(web)server
flag was not working... may have had it in the wrong spot... so I just followed the prompts as one would from normal authentication up until the opening a web browser part. Once it paused I opened the link it gave me, followed the prompts then it tried to open thehttp://localhost:port/auth/code
link. Naturally that didn't work and attempting to redirect to the remote IP, my case was internal, didn't either. I copied the link that was given in the local browser, ssh'd a second session into the remote machine, andcurl "http://localhost:port/auth/code"
. After making sure I used the quotes it authenticated as expected.The text was updated successfully, but these errors were encountered: