Skip to content

Commit

Permalink
Add option to ignore SSL certificates - Fixes #4
Browse files Browse the repository at this point in the history
  • Loading branch information
kost committed Jun 18, 2015
1 parent 603281c commit 0163c10
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion rip-git.pl
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

use strict;

use IO::Socket::SSL;
use LWP;
use LWP::UserAgent;
use HTTP::Request;
Expand Down Expand Up @@ -36,7 +37,7 @@
"b|branch=s" => \$config{'branch'},
"u|url=s" => \$config{'url'},
"c|checkout!" => \$config{'checkout'},
"s|verifyssl!" => \$config{'verifyssl'},
"s|sslignore!" => \$config{'sslignore'},
"v|verbose+" => \$config{'verbose'},
"h|help" => \&help
);
Expand All @@ -52,8 +53,13 @@

my @commits;
my $ua = LWP::UserAgent->new;

$ua->agent($config{'agent'});

if ($config{'sslignore'}) {
$ua->ssl_opts(SSL_verify_mode => IO::Socket::SSL::SSL_VERIFY_NONE, verify_hostname => 0);
}

my $gd=$config{'gitdir'}."/";

mkdir $gd;
Expand Down

0 comments on commit 0163c10

Please sign in to comment.