2017-03-01 71 views
1

我想从BitBucket上的远程存储库中获取。 git_remote_fetch返回错误消息:git_remote_fetch返回错误消息:“没有可用的TLS流”

there is no TLS stream available 

有些想法如何解决这个问题?

这里是我的代码:

if(error = git_remote_fetch(remote, NULL,NULL,"fetch")!=0) { 
    const git_error *lastError = giterr_last(); 
    cerr << "problem with fetch, error message : '" << lastError->message <<"'"<< endl; 
} 

回答

0

我试图用Python和pygit2(而这又取决于libgit2)从一个Git仓库拉当得到了同样的错误。我正在使用libgit2(0.25.0)的自编译版本。

用以下标志重新编译libgit2解决了问题:cmake -DCURL=OFF如libgit2项目的issue#3786 [1]中所述。

与附加标志编译按照pygit2文献[2]的全过程:

$ wget https://github.com/libgit2/libgit2/archive/v0.25.0.tar.gz 
$ tar xzf v0.25.0.tar.gz 
$ cd libgit2-0.25.0/ 
$ cmake -DCURL=OFF . 
$ make 
$ sudo make install 

确保删除libgit2的build目录,如果你一旦早期编译它,否则该标志将没有任何效果。

[1] https://github.com/libgit2/libgit2/issues/3786
[2] http://www.pygit2.org/install.html#quick-install

如果您使用的操作系统的libgit的内置版本我建议不妨使用一个编译版本。

相关问题