Getting Rugged::NetworkError on #connect

我与影子孤独终老i 提交于 2019-12-12 07:29:18

问题


I tried to implement fetch and this exception was raised:

Rugged::NetworkError: This transport isn't implemented. Sorry

I am able to retrieve a remote instance:

remote = Rugged::Remote.lookup(repo, remote_name)
remote.connect(:fetch)
# => Rugged::NetworkError: This transport isn't implemented. Sorry

I retrieved the development version of the gem as directed in the README:

gem 'rugged', git: 'git://github.com/libgit2/rugged.git', branch: 'development', submodules: true

How do I gain access to the connect method?


回答1:


libgit2 uses openssl for HTTPS and libssh2 for ssh. You need the development packages for them in order for the embedded libgit2 to build with support for those transports.




回答2:


Just to follow up on this, you need to install these:

openssl libssh2 libssl-dev pkg-config

Then you need to reinstall libgit2(rebuild), because the original shared libraries do not know that you've installed the new packages. See http://www.pygit2.org/install.html for installing.



来源:https://stackoverflow.com/questions/22255742/getting-ruggednetworkerror-on-connect

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!