3

Using openSUSE and Ubuntu with installed dependencies I can't clone the remote repository with Rugged::Repository.clone_at method and getting the error message:

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

The code:

credentials = Rugged::Credentials::SshKey.new(:privatekey=>'path/to/privatekey', :publickey=>'path/to/publickey', :passphrase=>'passphrase')
Rugged::Repository.clone_at 'ssh://github.com/vmoravec/repo', 'dir/to/destination', :credentials => credentials

My Gemfile for a rails project contais reference to the github repo like this:

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

The gem has been installed with command bundle install --path bundle/ The cloning does not work even with using bundle exec rails console

Installed system packages:

  • libssh2, libssh2-devel
  • openssl, libopenssl-devel, libopenssl

There is already similar question asked here on SO, but the solution does not work (although it's for MacOS I think): Getting Rugged::NetworkError on #connect

Community
  • 1
  • 1
vmoravec
  • 73
  • 6
  • Can you please link to the similar question and describe why that solution didn't work? – darthbith May 19 '14 at 16:03
  • 1
    Check for what `ldd` reports about the `rugged.so` that comes out of the file to see if the build system was able to detect it. What transport are you using? What actual code leads to the error? – Carlos Martín Nieto May 20 '14 at 02:34

1 Answers1

1

Removing the bundle/ directory and reinstalling the gems with bundle install --path bundle/ resolved the issue on both systems. It seems that the build system was not able for some reasons to detect the /usr/lib64/libssh2.so.1 dependency required for ssh transport. Carlos, thanks for the hint to use ldd rugged.so to check that.

vmoravec
  • 73
  • 6