严重同步错误,可能是谷歌 API 转移

Leo*_*nth 19 sync grive 14.04

我无法从在 Ubuntu 14.04 上运行的 grive 同步我的谷歌驱动器帐户。我以前从未遇到过问题。我尝试从我的系统中清除驱动器并删除所有本地文件夹,但是当我在重新安装后尝试运行 grive 时仍然想出这个。

user@user-OptiPlex-780:~/drive$ grive
grive: Symbol `json_tokener_errors' has different size in shared  object, consider re-linking
Reading local directories
Synchronizing folders
exception: /build/buildd/grive-0.2.0/libgrive/src/http/CurlAgent.cc(149): Throw in function long int    gr::http::CurlAgent::ExecCurl(const string&, gr::http::Receivable*, const   gr::http::Header&)
Dynamic exception type:boost::exception_detail::clone_impl<gr::http::Error>
std::exception::what: std::exception
[gr::expt::MsgTag*] = 
[gr::http::CurlCodeTag*] = 0
[gr::http::HttpResponseTag*] = 400
[gr::http::UrlTag*] = https://docs.google.com/feeds/default/private/full/-/folder?max-results=50&showroot=true
[gr::http::HeaderTag*] = Authorization: Bearer ya29.WwFOho3OkmkxFIdn86HBbtpSIyBYDzDgQua1K6JcEu7kCBLgvY1aEiUHCZlSCuli_qPHkTfNZLhDfQ
GData-Version: 3.0
Run Code Online (Sandbox Code Playgroud)

这是一个指向 google 开发人员页面的链接,该页面表明 API 今天已更改链接。这可能是个问题吗?

Dan*_*ath 18

是的,Grive 正在使用已失效的文档列表 API。截至太平洋标准时间上午 9 点左右,我们停止提供这些 API 请求。这就是 Grive 客户端收到“400 Bad Request”响应的原因。

看看这个项目,它似乎已经将近一年没有维护了,而且绝对没有更新(这里这里)到 2012 年正式弃用 Documents List 时发布的新 API。


小智 9

一个很好的选择可能是驱动器,它是写入的go并且具有很多功能。

要安装,请遵循以下说明:

  1. 安装需要的包

    sudo apt-get install golang git mercurial
    
    Run Code Online (Sandbox Code Playgroud)
  2. go在您的主目录中为包创建一个路径

    mkdir $HOME/go $HOME/go/bin
    
    Run Code Online (Sandbox Code Playgroud)
  3. 通过编辑.profile主目录中的文件,将这些路径添加到适当的环境变量中。因此,在该文件的和添加这些行:

    if [ -d "$HOME/go" ] ; then
        export GOPATH="$HOME/go"
    fi
    
    if [ -d "$HOME/go/bin" ] ; then
        PATH="$HOME/go/bin:$PATH"
    fi
    
    Run Code Online (Sandbox Code Playgroud)
  4. 注销并登录以使更改生效。

  5. drive从最新源下载并安装

    go get -u github.com/odeke-em/drive/cmd/drive
    
    Run Code Online (Sandbox Code Playgroud)
  6. 阅读https://github.com/odeke-em/drive/#usage

    基本用法:

    • drive init <folder>初始化<folder>以与您的 Google Drive 同步。
    • 如果drive pull您在初始化的文件夹中执行此操作,它将从 Google Drive 下载所有更改。第一次,也许您必须多次执行此操作才能下载所有内容。
    • drive push 上传本地更改。
    • drive pull <fileOrPath>drive push <fileOrPath>仅对 执行相应的操作<fileOrPath>
    • 还有更多选项可供使用,因此请阅读手册。


小智 5

已经制作了一个可以再次使用的叉叉(不是我做的,只是找到了它)

https://github.com/vitalif/grive2

更换方便

mkdir grive 
cd grive/
git clone https://github.com/vitalif/grive2.git
cd grive2/
mkdir build 
cd build 
cmake ..
make -j4
sudo make install
Run Code Online (Sandbox Code Playgroud)

现在 grive 对我来说很好用。