Skip to content
Browse files

Add LICENSE and README

  • Loading branch information...
1 parent 29e1652 commit a3ed56e0dc930643436d6a10b046198dea517c63 @martinemde committed Dec 4, 2010
Showing with 42 additions and 0 deletions.
  1. +22 −0 LICENSE
  2. +20 −0 README.md
View
22 LICENSE
@@ -0,0 +1,22 @@
+Copyright (c) 2009 Martin Emde
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+And now the caps-lock text that's in these things:
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
View
20 README.md
@@ -0,0 +1,20 @@
+# GitSSHWrapper
+
+Encapsulate the code you need to write out a permissive GIT_SSH script that
+can be used to connect git to protected git@github.com repositories.
+
+## Example
+
+ def get_refs
+ wrapper = GitSSHWrapper.new(:private_key_path => '~/.ssh/id_rsa')
+ `env #{wrapper.git_ssh} git ls-remote git@github.com:martinemde/git-ssh-wrapper.git`
+ ensure
+ wrapper.unlink
+ end
+
+OR
+
+ GitSSHWrapper.new(:private_key => Pathname.new('id_rsa').read)
+
+The wrapper creates Temfiles when it is initialized. They will be cleaned at
+program exit, or you can unlink them by calling #unlink like the example above.

0 comments on commit a3ed56e

Please sign in to comment.
Something went wrong with that request. Please try again.