Project

ssh2http

0.01
No commit activity in last 3 years
No release in over 3 years
A restricted login shell for Git-only SSH access, which delegates git pull/push requests to a git http backend.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.11
~> 10.0
~> 3.0
 Project Readme

ssh2http

A restricted login shell for Git-only SSH access, which delegates git pull/push requests to a git http backend.

Gem Version Build Status Code Climate codecov.io

Installation

Add this line to your application's Gemfile:

gem 'ssh2http'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ssh2http

Usage

Add this line to your ~/.ssh/authorized_keys:

command="source $HOME/.profile && cd <your_project_path> && bundle exec ssh2http <HTTP destination>",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty <your_pub_key>

Or if you prefer to install the gem globally:

command="source $HOME/.profile && ssh2http <HTTP destination>",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty <your_pub_key>

For example,

command="source $HOME/.profile && cd /Users/pmq20/ssh2http && bundle exec ssh2http http://localhost",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa XXXXXXXXXXXXXXXXXXXX pmq2001@gmail.com

Then:

git clone pmq20@localhost:/path/to/repo.git

and the request will be delegated to http://localhost/path/to/repo.git.