Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/cplusplus/144.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C++ git“u remote”fetch返回错误,并显示消息:“0”;“没有可用的TLS流”;_C++_Fetch_Libgit2 - Fatal编程技术网

C++ git“u remote”fetch返回错误,并显示消息:“0”;“没有可用的TLS流”;

C++ git“u remote”fetch返回错误,并显示消息:“0”;“没有可用的TLS流”;,c++,fetch,libgit2,C++,Fetch,Libgit2,我正在尝试从BitBucket上的远程存储库获取。git_remote_fetch返回错误消息: 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, er

我正在尝试从BitBucket上的远程存储库获取。git_remote_fetch返回错误消息:

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;
}
if(error=git\u remote\u fetch(remote,NULL,NULL,“fetch”)!=0){
常量git_error*lastError=giterr_last();

cerr我在尝试使用Python和pygit2(这反过来又依赖于libgit2)从git存储库中提取时遇到了相同的错误。我使用的是libgit2的自编译版本(0.25.0)

使用以下标志重新编译libgit2解决了这个问题:
cmake-DCURL=OFF
,如libgit2项目第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的构建目录,请确保将其删除,否则该标志将无效

[1]
[2]


如果您使用操作系统的内置版本libgit,我建议您尝试使用编译版本。

我在尝试使用Python和pygit2(这反过来又取决于libgit2)从git存储库中提取时遇到了相同的错误。我使用的是自编译版本的libgit2(0.25.0)

使用以下标志重新编译libgit2解决了这个问题:
cmake-DCURL=OFF
,如libgit2项目第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的构建目录,请确保将其删除,否则该标志将无效

[1]
[2]

如果您使用操作系统的内置版本libgit,我建议尝试使用编译版本