Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a --with-ssh build flag to set USE_SSH=ON #928

Merged
merged 1 commit into from
Jul 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,27 @@ Please follow the above in case installation of the gem fails with `ERROR: CMake

If you want to build Rugged with HTTPS and SSH support, check out the list of optional [libgit2 dependencies](https://github.com/libgit2/libgit2#optional-dependencies).

To install `rugged` with SSH support ensure you have the `LibSSH2` library present, then pass the required `CMAKE_FLAGS`:
```bash
CMAKE_FLAGS='-DUSE_SSH=ON' gem install rugged
```

Or pass the `--with-ssh` build option:
```bash
gem install rugged -- --with-ssh
```

If you're using bundler and want to bundle `libgit2` with Rugged, you can use the `:submodules` option:

```ruby
gem 'rugged', git: 'git://github.com/libgit2/rugged.git', submodules: true
```

If you would like to bundle rugged with SSH support add the `--with-ssh` build option to the bundler config:
```bash
bundle config build.rugged --with-ssh
```

## Usage
To load Rugged, you'll usually want to add something like this:

Expand Down
1 change: 1 addition & 0 deletions ext/rugged/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
cmake_flags = [ ENV["CMAKE_FLAGS"] ]
cmake_flags << "-DREGEX_BACKEND=builtin"
cmake_flags << "-DUSE_SHA1DC=ON" if with_config("sha1dc")
cmake_flags << "-DUSE_SSH=ON" if with_config("ssh")

def sys(cmd)
puts " -- #{cmd}"
Expand Down