Merge pull request #396 from boxen/two_factor_support
Add two-factor support
This commit is contained in:
commit
f0726ce4ed
16 changed files with 15 additions and 22 deletions
2
Gemfile
2
Gemfile
|
@ -1,6 +1,6 @@
|
|||
source "https://rubygems.org"
|
||||
|
||||
gem "boxen", "~> 1.5"
|
||||
gem "boxen", "~> 2.0.0"
|
||||
gem "open4", "~> 1.3"
|
||||
|
||||
group :development do
|
||||
|
|
27
Gemfile.lock
27
Gemfile.lock
|
@ -1,27 +1,23 @@
|
|||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
addressable (2.3.5)
|
||||
ansi (1.4.3)
|
||||
aws-sdk (1.8.2)
|
||||
json (~> 1.4)
|
||||
nokogiri (>= 1.4.4)
|
||||
uuidtools (~> 2.1)
|
||||
boxen (1.5.2)
|
||||
boxen (2.0.0)
|
||||
ansi (~> 1.4)
|
||||
hiera (~> 1.0)
|
||||
highline (~> 1.6)
|
||||
json_pure (>= 1.7.7, < 2.0)
|
||||
librarian-puppet (~> 0.9.9)
|
||||
octokit (~> 1.15)
|
||||
octokit (~> 2.0.0)
|
||||
puppet (~> 3.0)
|
||||
builder (3.1.4)
|
||||
facter (1.7.2)
|
||||
faraday (0.8.8)
|
||||
multipart-post (~> 1.2.0)
|
||||
faraday_middleware (0.9.0)
|
||||
faraday (>= 0.7.4, < 0.9)
|
||||
hashie (2.0.5)
|
||||
hiera (1.2.1)
|
||||
json_pure
|
||||
highline (1.6.19)
|
||||
|
@ -30,18 +26,11 @@ GEM
|
|||
librarian-puppet (0.9.10)
|
||||
json
|
||||
thor (~> 0.15)
|
||||
multi_json (1.7.9)
|
||||
multipart-post (1.2.0)
|
||||
net-ssh (2.6.5)
|
||||
netrc (0.7.7)
|
||||
nokogiri (1.5.6)
|
||||
octokit (1.25.0)
|
||||
addressable (~> 2.2)
|
||||
faraday (~> 0.8)
|
||||
faraday_middleware (~> 0.9)
|
||||
hashie (~> 2.0)
|
||||
multi_json (~> 1.3)
|
||||
netrc (~> 0.7.7)
|
||||
octokit (2.0.0)
|
||||
sawyer (~> 0.3.0)
|
||||
open4 (1.3.0)
|
||||
puppet (3.2.4)
|
||||
facter (~> 1.6)
|
||||
|
@ -51,9 +40,13 @@ GEM
|
|||
builder
|
||||
nokogiri (>= 1.4.1)
|
||||
trollop
|
||||
rgen (0.6.5)
|
||||
rgen (0.6.6)
|
||||
sawyer (0.3.0)
|
||||
faraday (~> 0.8, < 0.10)
|
||||
uri_template (~> 0.5.0)
|
||||
thor (0.18.1)
|
||||
trollop (2.0)
|
||||
uri_template (0.5.3)
|
||||
uuidtools (2.1.3)
|
||||
|
||||
PLATFORMS
|
||||
|
@ -61,7 +54,7 @@ PLATFORMS
|
|||
|
||||
DEPENDENCIES
|
||||
aws-sdk
|
||||
boxen (~> 1.5)
|
||||
boxen (~> 2.0.0)
|
||||
net-ssh
|
||||
open4 (~> 1.3)
|
||||
rbvmomi
|
||||
|
|
|
@ -26,7 +26,10 @@ config = Boxen::Config.load
|
|||
input = $stdin.read
|
||||
attrs = Hash[input.split($/).map { |l| l.split("=") }]
|
||||
|
||||
if command != "get" || attrs["host"] != "github.com"
|
||||
if command == "get" && attrs["host"] =~ /(^|\.)github\.com$/
|
||||
puts "username=#{config.token}"
|
||||
puts "password=x-oauth-basic"
|
||||
else
|
||||
require "open4"
|
||||
|
||||
fallback = ENV["BOXEN_GIT_CREDENTIAL_FALLBACK"]
|
||||
|
@ -41,6 +44,3 @@ if command != "get" || attrs["host"] != "github.com"
|
|||
|
||||
exit status.exitstatus
|
||||
end
|
||||
|
||||
puts "username=#{config.login}"
|
||||
puts "password=#{config.password}"
|
||||
|
|
BIN
vendor/cache/addressable-2.3.5.gem
vendored
BIN
vendor/cache/addressable-2.3.5.gem
vendored
Binary file not shown.
BIN
vendor/cache/boxen-1.5.2.gem
vendored
BIN
vendor/cache/boxen-1.5.2.gem
vendored
Binary file not shown.
BIN
vendor/cache/boxen-2.0.0.gem
vendored
Normal file
BIN
vendor/cache/boxen-2.0.0.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/faraday_middleware-0.9.0.gem
vendored
BIN
vendor/cache/faraday_middleware-0.9.0.gem
vendored
Binary file not shown.
BIN
vendor/cache/hashie-2.0.5.gem
vendored
BIN
vendor/cache/hashie-2.0.5.gem
vendored
Binary file not shown.
BIN
vendor/cache/multi_json-1.7.9.gem
vendored
BIN
vendor/cache/multi_json-1.7.9.gem
vendored
Binary file not shown.
BIN
vendor/cache/netrc-0.7.7.gem
vendored
BIN
vendor/cache/netrc-0.7.7.gem
vendored
Binary file not shown.
BIN
vendor/cache/octokit-1.25.0.gem
vendored
BIN
vendor/cache/octokit-1.25.0.gem
vendored
Binary file not shown.
BIN
vendor/cache/octokit-2.0.0.gem
vendored
Normal file
BIN
vendor/cache/octokit-2.0.0.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/rgen-0.6.5.gem
vendored
BIN
vendor/cache/rgen-0.6.5.gem
vendored
Binary file not shown.
BIN
vendor/cache/rgen-0.6.6.gem
vendored
Normal file
BIN
vendor/cache/rgen-0.6.6.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/sawyer-0.3.0.gem
vendored
Normal file
BIN
vendor/cache/sawyer-0.3.0.gem
vendored
Normal file
Binary file not shown.
BIN
vendor/cache/uri_template-0.5.3.gem
vendored
Normal file
BIN
vendor/cache/uri_template-0.5.3.gem
vendored
Normal file
Binary file not shown.
Loading…
Reference in a new issue