dvc: wrong redirection when dvc push to gdrive and no verification code is shown
Bug Report
I have already set-up my gdrive FOLDER_ID
accroding to the DVC document.
However, the line for Enter verification code:
did not show.
When I pasted the link to the browser authorized it, and click the continuing button,
the browser redirect to localhost:8080?code=...
and no verification code is shown.
The issue is about DVC version 2.13.0
.
Everything looks fine after I downgraded my DVC version to 2.11.0
.
Reproduce
$ dvc add data
$ dvc remote add -d ${REMOTE_NAME} gdrive://${FOLDER_ID}
$ dvc push
Expected
Enter verification code:
should be shown and the browser should redirect to the corresponding verification code.
Environment information
DVC version 2.13.0
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 16 (7 by maintainers)
I am having the same issue as @shakraz, when I try to use DVC commands related to the Google Drive on my ssh server. It is behind the OpenVPN and I assume, that this may cause this issue.
The only fix that works is the one suggested by @Min-Sheng here:
In my case with the OpenVPN the command is:
ssh -L 8080:localhost:8080 your-username@your-remote-name
@efiop My suggestion is that maybe making the old authorization method (with copying the code from the browser to the terminal) available again would be enough as a quick-fix. It may be enabled via an optional parameter. This would be sufficient in most vpn-based scenarios as the user would paste the code to the terminal with the open ssh session, which would be already behind the VPN.
For the record, docs are a bit outdated - I’ve created a PR - https://github.com/iterative/dvc.org/pull/3821/files
It doesn’t to
Enter verification code
now, it get’s from the browser since via web server that it creates.Do you see the
Authentication successful.
?Hi @efiop and @shcheklein. Thanks for your concern!
For DVC version
2.13.0
But after I authorize, it redirect to this url: http://localhost:8080/?code=4/0AdQt8qgV8SAXduPyDDgMexBuWbU61HsL8T0vFoPdS4UpGLVBnEx6-oTae10pkd7dY94fMQ&scope=https://www.googleapis.com/auth/drive https://www.googleapis.com/auth/drive.appdata
For DVC version
2.15.0
, I got the error:@xihajun Sorry for a late response. As long as you update dvc along with corresponding
pydrive2
version (e.g. make sure pip check is not complaining) - it should work fine.@shakraz Please share more details about the error you are getting. There has been multiple things discussed in this ticket with different workaround solutions.
Thanks for all of this. May I kindly ask if we went back to version
2.11.0
, will we still have the same issue?I think I find the problem. It is about port forwarding! Because I run DVC on my remote server via SSH, I need to forward my
localhost 8080 port
toremote server 8080 port
.